Originally Posted by
laserlight
Do you really need to implement some kind of inheritance and polymorphism? If not, the usual approach of having a struct type and a core library of functions that operate on it (including init and cleanup) will do for abstraction and encapsulation: method call syntax is just syntactic sugar. You can have the "data hiding" aspect of encapsulation by using the opaque pointer idiom and thereby ensure that users of your struct type cannot access its members directly, thus allowing you to change the "private internals" of the "class" at will. Likewise, static functions in the source file used to implement the struct's associated functions can serve as "private member functions".