   C++ Inheritance
  I have a class, CMeshObject which is an abstract class from which all the 'things' in my world inherit.I've made Car and Wheel classes which inherit from this. What I'm intending to do is for the Car to hold pointers to all 4 Wheels and for the Wheels each to have a pointer to their parent Car.The problem is that when I try to declare:Car* mParentCar; in the Wheel class andWheel* mWheels[4]; in the Car class, the compiler says they're both an undeclared identifier.EDIT: Not an undeclared identifier, I get 'syntax error : missing ';' before '*' and 'missing type specifier - int assumed.'Both the Wheel and Car classes #include eath other's header files.#ifndef CAR_H#define CAR_H#include "CMeshObject.h"#include "Wheel.h"#include "d3dx9.h"class Car : public CMeshObject{public:Car();void getVerts(D3DXVECTOR3* vertArray, int polyIndex);void transformCar(D3DXMATRIX*);void rotateWheels(float theta);Wheel*wheels[4];};#endif #ifndef WHEEL_H#define WHEEL_H#include "CMeshObject.h"#include "Car.h"#include "d3dx9.h"class Wheel : public CMeshObject{public:Wheel();void getVerts(D3DXVECTOR3* vertArray, int polyIndex);void linkParent(Car* car);void rotate(float theta);Car* mParentCar;D3DXVECTOR3 mPosOnCar;D3DXMATRIX mRotation;};#endifif I declare them as CMeshObject* then it works and I can store them, but when I want to use the methods of the child class later, it won't let me at them because I can't cast the CMeshObject to a Car or Wheel.   
  Your headers are including each other. They shouldn't: you should forward-declare your classes instead. Read this.   ;  Got it, thanks :-)I've since realised the casting problem was me messing up too - its perfectly possible to do the cast.The wheels on my car can now go round independently, but rotate with the car :D   