I came from Java to C++ ...
When I try to do this ...
class Box {
Table* onTable;
};
class Table {
Box* boxOnIt;
};
int main() {
Table table;
Box box;
table.boxOnIt = &box;
box.onTable = &table;
return 0;
}
the compiler tell me that Table is undefined. If I switch class definitions the compiler tell me that Box is undefined
In java I was able to do something like this with no problem. Is there a solution for this to work? thanks...