   warning C4243: type cast conversion from 'class CPlanet *' to 'class CGameObject *'..
  Hi,I've this warning:warning C4243: type cast conversion from 'class CPlanet *' to 'class CGameObject *' exists, but is inaccessibleThe class are these:Class CPlanetclass CPlanet : CGameObject{public:CPlanet(void);~CPlanet(void);void setSize(float planetSize);// Overridden methods from the parent classbool create(LPDIRECT3DDEVICE9 device);void render(LPDIRECT3DDEVICE9 device);private:CModel *Model;D3DXVECTOR3 position;//LPDirect3DTexture9 texture;float size;float rotationRate;};CPlanet::CPlanet(void){}CPlanet::~CPlanet(void){}bool CPlanet::create(LPDIRECT3DDEVICE9 device){position.x = 0.0f;position.y = 0.0f;position.z = 0.0f;// Create the model for this planetModel = new CModel();return Model->loadModel(device, "sphere.x");}void CPlanet::render(LPDIRECT3DDEVICE9 device){D3DXMATRIX transMatrix;// the translation matrixD3DXMATRIX scaleMatrix;// the scale matrixD3DXMATRIX rotateMatrix;// The rotation matrix// Setup the translation matrixD3DXMatrixTranslation(&transMatrix, position.x, position.y, position.z);// Cause the planet to rotateD3DXMatrixRotationY(&rotateMatrix, timeGetTime()/1000.0f);// Scale the planet by the size amountD3DXMatrixScaling(&scaleMatrix, size, size, size);// Multiply the rotation matrix by the translationD3DXMatrixMultiply(&transMatrix, &rotateMatrix, &transMatrix);// Multiply the translation matrix by the scaleD3DXMatrixMultiply(&transMatrix, &scaleMatrix, &transMatrix);// Transform the object into world spacedevice->SetTransform(D3DTS_WORLD, &transMatrix);// Render the planetModel->render(device);}void CPlanet::setSize(float planetSize){size = planetSize;}Class CGameObjectclass CGameObject{public:CGameObject(void);virtual ~CGameObject(void);// Abstract methods, must be overriddenvirtual bool create(LPDIRECT3DDEVICE9 device) = 0;virtual void render(LPDIRECT3DDEVICE9 device) = 0;protected:CModel *Model;// A pointer to a model objectD3DXVECTOR3 position;// The position of this object in world space};CGameObject::CGameObject(void){// Set the model pointer to NULLModel = NULL;// Set the default position to the originposition.x = 0.0f;position.y = 0.0f;position.z = 0.0f;}CGameObject::~CGameObject(void){// Delete the Model pointer when the object is destroyedif (Model)delete Model;}So, what can i do? Thanks for help! :(   
  This is not an answer to your question, but a comment on your code:In CGameObject you have position and Model as protected members, that means you shouldn't also have them in CPlanet. The reason you declared them in the first place in CGameObject was so that they was automatically included in derived classes.;  you dont publicly inherit from CGameObject, thats what it means by 'i can do it, but I cant see how'   ;Quote:Original post by phantomyou dont publicly inherit from CGameObject, thats what it means by 'i can do it, but I cant see how'ie: class CPlanet : CGameObject==class CPlanet : private CGameObjectTo correct the problem, useclass CPlanet : public CGameObjectRegards,   