Structures and casting in C

前端 未结 8 1512
野性不改
野性不改 2020-12-16 02:07

I was wondering:

If I have structure definitions, for example, like this:

struct Base {
  int foo;
};

struct Derived {
  int foo; // int foo is comm         


        
8条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-16 02:47

    As you seem to be aiming at Object Oriented Programming in C I can suggest you to have a look at the following link:

    http://www.planetpdf.com/codecuts/pdfs/ooc.pdf

    It goes into detail about ways of handling oop principles in ANSI C.

提交回复
热议问题