If you only want one class, use an array of struct
s as the "objects" data and pass pointers to them to the "member" functions. You can use typedef struct _whatever Whatever
before declaring struct _whatever
to hide the implementation from client code. There's no difference between such an "object" and the C standard library FILE
object.
If you want more than one class with inheritance and virtual functions, then it's common to have pointers to the functions as members of the struct, or a shared pointer to a table of virtual functions. The GObject library uses both this and the typedef trick, and is widely used.
There's also a book on techniques for this available online - Object Oriented Programming with ANSI C.