class a
{
public:
ISceneNode* Node;
}
class b : public a
{
public:
ICameraSceneNode* Node;
}
I have code like that to similar effect in my project, and it compiles fine, but whenever a function is called that addressed the ICameraSceneNode Node, the program "encounters an unexpected error and has to close".
If it's not possible, can anyone give any suggestions to workarounds?
class a
{
public:
a(ISceneNode* Node)
{
m_Node = Node;
}
ISceneNode* m_Node;
};
class b : public a
{
public:
b(ICameraSceneNode* cam) : a(cam)
{
m_cam = cam;
}
ICameraSceneNode* m_cam;
};
That way u can use the scenenode like a scenenode out of the base class and the camera from the otherone.
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.