I have a very strange question.
I have a class/function :
class MCBSystem {
[...]
template <class Receiver>
void setCallBack(int i, Receiver* receiver, void(Receiver::*function)(void*)) {
iCallBacks.at(i) = new CallBack<Receiver>(receiver, function, this);
};
};
And I inherit it (multiply) in another class :
class MenuBox : public OverlayBox, public HIDListener, public FANLib::MCBSystem {
[...]
};
Now, if I call the "setCallBack" function :
menuBox->setCallBack(MenuBox::CLICKED, this, &SubMain::widgetClicked);
then "menuBox" has a value say 0x06cf22b8 but inside "setCallBack", "this" is 0x06cf2370.
Can someone explain what on earth is going on?
[EDIT:] The true question is : if I need to store 'this' inside 'setCallBack', how can I check later that 'menuBox == this'?
Many thanks in advace!