Incomplete Type Is Not Allowed

You are trying:

Node ParentNode;  //Error on this line

but Node is not a complete type at this point (you are in fact defining it at this point), a structure cannot contain an instance of itself, it can contain a pointer or reference to an instance of itself but not an actual instance. After all, if such recursive containment were allowed, where would it end?

Leave a Comment