CCControl addTarget

I don’t understand how to add a target for a CCControl Object. I’m using a CCControlButton, and I don’t know how to pass the selector. Can someone correct my code?

btn->addTargetWithActionForControlEvents(*this, cocos2d::extension::cccontrol_selector(PPGame::botPauseButtonTapped()), cocos2d::extension::CCControlEventTouchUpInside);

Hello

Try something like this

USING_NS_CC_EXT;

void botPauseButtonTapped( Object *obj, Control::EventType eventtype )
{
...
}

...

btn->addTargetWithActionForControlEvents(this, cccontrol_selector(botPauseButtonTapped),
Control::EventType::TOUCH_UP_INSIDE);