This question already has an answer here:
- Object-orientation in C 18 answers
Is it possible to model inheritance using C? How? Sample code will help.
Edit: I am looking to inherit both data and methods. Containership alone will not help. Substitutability - using any derived class object where a base class object works - is what I need.
It should be possible, at least to some extent.
What exactly do you need to model? The inheritance of the data or the methods?
Edit: Here's a short article that I found: http://fluff.info/blog/arch/00000162.htm