i have been struggeling with a problem for a while.
im making my own "API" in HGE. I do have a inheritance of classes. The base class is called Component and is connected width the classes: Button, Label, textField and so on. I have a class called ComponentHandler. It handels the Components. for example addButton, addLabel and so on. I have declared dubbelpointers to the base class (the Component class) in the ComponentHandler as shown below.
//*******************************
class ComponentHandler
private:
Component** components;
//*******************************
I have a memberfunction called AddButton.
part of the code just to get it more clear:)
this->components[this->numberOfComponents] = new Button();
The thing is that i need to get access to the buttons memberfunctions. But because components i dubbelpointers to the base-class i cant get access to them. is there some way to get that? i tried casting bt didnt get it to work. Any help would be really appreciated:) i have been struggeling with this some time now:S