Hello there,
I'm currently working on a GUI system for OGL but somehow I got stuck along the way.
I'm splitting my code up into multiple namespaces, just to keep it organised.
Now I have a namespace Gui::Controls, in which I will define all my controls.
In this namespace I have my base class Control, which I need to implement in all my other controls.
This is my declaration of the Gui::Controls::Control class:
PHP Code:
namespace Gui{
namespace Controls{
class Control : public Object{
....
};
};
};
And this is my declaration of the Button control, which needs to implement Gui::Controls::Control:
PHP Code:
namespace Gui{
namespace Controls{
class Button: public Control{
....
};
};
};
(Gui::Controls::Control resides in control.h, and Gui::Controls::Button resides in button.h.
button.h is including control.h.)
Now this doesn't seem to work as i get the following error:
Code:
error C2504: 'Control' : base class undefined
Any ideas how to solve this?
Grtz, Tom.