It got rid of the compiler error at first, but now that I try to actually use it, it still yells at me. It tells me that my use of the undefined class is invalid. Here's what I'm trying to do more specifically.
I have the classes person and room, and I want the person to have a variable referencing the room it is.
Code:
class person
{
public:
room *loc;
unsigned short int x, y, z;
person(void)
{
x = 0; y = 0; z = 0;
loc = &rooms[x][y][z];
loc->enter();
}
}
And for room.enter() I have
Code:
class room
{
public:
void enter(PC *PC = NULL)
{
if(PC == NULL) PC = &you //you being a variable that keeps track of the main person
PC->loc = this object
//I don't know how to reference the source, but that's something I already had a different post asking about
}
}