문제

i have a few imagebuttons with their respective buttonListeners.

on the buttonClicked function i try to:

void TestComponent::buttonClicked (Button* activeButton) {

    if (activeButton == typeButton) {

       //do something

    }

}

But i get

"No match for operator == in activeButton..."

How can i add the parent class Button equality operator to ImageButton?

도움이 되었습니까?

해결책

activeButton is a pointer. What is typeButton?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top