C++ syntax help dealing with recursive definition (or so my compiler tells me)
<p>I'm building a game and I was compiling seeing what sort of errors were coming up and there is one there is very common and very puzzling to me:</p>

<pre><code>1&gt;c:\users\owner\desktop\bosconian\code\bosconian\ship.h(9) : error C2460: 'Ship::Coordinate' : uses 'Ship', which is being defined
</code></pre>

<p>This also comes up for the SpaceObject class and all other derivations of it. The Coordinate class is simply just a 2d vector class and, if it matters, references nothing but an Environment class.</p>

<p>The Environment class references the SpaceObject's but I don't believe that's a problem (correct me if I'm wrong)</p>

<p>This is my first larger scale project in C++ and I was wondering if this might be a common newbie error with a more obvious solution. If it matters the SpaceObject class hierarchy is not all the way filled in, but it is filled in several levels past the SpaceObject and Ship classes.
.<br />
.<br />
.<br />
Edit: This is in response to the comment. </p>

<p>-When I say reference I mean refer to that class in another class. Like in the SpaceObject class I reference the Coordinate class:<br />
    Coordinate * position</p>

<p>Environment does make reference to SpaceObject pointers, but I can't see I could not reference classes like that...I mean, all my classes have to relate to eachother in some way, right?</p>

<p>In response to pasting code, it's sort of hard because they are huge classes but here is the line the error is pointing to:</p>

<pre><code>public:
Ship(Coordinate * positionObject_, int direction_, int possibleDirections_, int maxHealth_, Component * objectSectors_, int numOfObjectSectors_, double speed_);//this is the line
void move();//handles the actual translation of calculated move on the map (i.e. bounds checking)
</code></pre>
