Posted: Wed Nov 14, 2007 6:48 pm
I have this situation. Consider two structs that look like this ...
struct A { struct B s1; };
struct B { struct A s2; };
Compiler tosses an incomplete type error cos it obviously can't allocate memory for struct A till it knows struct B. But struct B needs struct A first.
What's the syntax that assures the compiler that struct B gets defined later, so I can initially define struct A?
struct A { struct B s1; };
struct B { struct A s2; };
Compiler tosses an incomplete type error cos it obviously can't allocate memory for struct A till it knows struct B. But struct B needs struct A first.
What's the syntax that assures the compiler that struct B gets defined later, so I can initially define struct A?