Original Post
I have these two classes whose headers look like these:
Class Planet:
#include "bitmap_file.h"
#include "image.h"
#include "resources.h"
#include "ship.h"
...
class planet
{
...
private:
...
ship *in_orbit[MAX_SHIPS];
};
// end class
Class Ship:
class ship
{
...
};
// end class
I want to add a planet variable to class ship, so, as you see, class planet has to be aware that class ship exists and vice-versa. My problem is, it gives me 18 compilation errors when I had the mentioned variable; if I try to include "planet.h" in the ship file, it gives even more errors. Can anyone tell me what''s going on and how can I fix this. I know it''s relationed to the headers.
Thanks.