I am attempting to add a listener to a seperate class from the component that holds a button.
I declare a private button and a pointer to it in the component:
Button * changeButtonPtr = &changeButton;
I then declare a public function to return the pointer:
Button * Gui::getChangeButtonPtr()
In the listening class I get the button pointer via the class object pointer and declare a listener:
changeButtonPtr = guiPtr->getChangeButtonPtr();
Add the code to test:
void Hub::buttonClicked (Button* button)
if (button == changeButtonPtr)
cout << "Working?" << endl;
And we have a great steaming pile of nada.
Thank you anyone for your help and explaination, apologies for the beginner questions!