I'm trying to do a program involving a base class and subclasses, whose subclasses use each other. In terms of code:
Class Space
{
...
};
Class Room : public Space
{
Link* l;
...
};
Class Link : public Space
{
Room* r;
...
};
Now I'm getting "ISO C++ forbids declaration of `Link' with no type" errors, understandably. But I can't figure out how to rearrange or change it so it isn't trying to use a type who's definition it hasn't seen yet. Suggestions?