I'm working on a simple inheritance system for graphics objects in a game engine, but I've hit a snag with calling the functions of a class that I've inherited from. In my code, I have Model inherited from Transform, and I want to call Transform::init from Model::init. To do this, I have code like:
Code:
//transform.h
class Transform {
protected:
    SceneNode* sceneNode;
public:
    void init();
};

//transform.cpp
void Transform::init() {
    sceneNode = new SceneNode(/*etc*/);
    //here sceneNode is a good pointer
}

//model.h
class Model : public Transform {
public:
    void init();
};

//model.cpp
void Model::init() {
    Transform::init();
     //here sceneNode is null
}
I don't understand why Transform::init() isn't setting sceneNode in the inherited class. Is there something I need to change in the declarations, or do I need to call Transform::init() differently, or am I just doing something completely wrong?