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?
hey, C hackers
Yeah, this assignment appears to be : 1% thinking, 99% figure out how to do forward declaration in C w\ a union that uses five structs, each of which also uses the union. Both my classes have quickly devolved to suckage this semester.TheCatt wrote:HAHAHAHA! C!
Good one.
Diogenes of Sinope: "It is not that I am mad, it is only that my head is different from yours."
Arnold Judas Rimmer, BSC, SSC: "Better dead than smeg."
Arnold Judas Rimmer, BSC, SSC: "Better dead than smeg."
Not to be all doom & gloom on that system (since I'm kinda in it), but you're right more than 50% of the time.TheCatt wrote:Just reinforces my notion that school is pretty much worthless.
Diogenes of Sinope: "It is not that I am mad, it is only that my head is different from yours."
Arnold Judas Rimmer, BSC, SSC: "Better dead than smeg."
Arnold Judas Rimmer, BSC, SSC: "Better dead than smeg."