When using classes in C++, how can you have it where both classes have a reference to each other? For example, we have a space ship class, and a space ship's component class:
Space ship components header...
Space ships header...
/* blah */
Ship* mMyShip; // Reference to its ship so it can do stuff to it
Now obivously the compiler has trouble sorting this out, so is this just poor design on my behalf, or are there ways round this problem? Any help will be greatly appreciated,
// List of components the ship has