@pan1cmode wrote:
Hey there,
I am migrating from Unity to Cocos and stuck with a problem.
Trying to pass callback on event listener like this:auto mButton = Button::create(); mButton->addClickEventListener(CC_CALLBACK_0(ElementsMatrix::BuildMatrix(), this));
Getting "Cannot take the address of an rvalue of type 'void'" (XCode)
Nothing special with method BuildMatrix():void ElementsMatrix::BuildMatrix() { CCLOG("Build is ready!"); }
I've read about rvalue, but it doesn't make any sense for me regarding to this problem. Any help?
Thanks!
Posts: 3
Participants: 2