Porting Object-Oriented Concepts to C

It's possible to create object-oriented like code in C, which is very useful for mimicking standard libraries and objects found in C++ such as the Stack and Queue classes. Take a class design from what would be standard C++, retain strictly only member variables, and move them to a struct. Within global space, create functions that take a pointer to a related struct instance and manipulate accordingly. For every instance of the object, only use the related functions instead of directly accessing the data. This is to mimic the data hiding found in C++, but is not a strict rule.

Sample C++ class

Object-oriented mimicked code in C

Links
Wikipedia Article on the C Programming language