Reference to non-static member function must be called

前端 未结 2 1472
感情败类
感情败类 2020-12-04 19:37

I\'m using C++ (not C++11). I need to make a pointer to a function inside a class. I try to do following:

void MyClass::buttonClickedEvent( int buttonId ) {
         


        
2条回答
  •  渐次进展
    2020-12-04 20:15

    You may want to have a look at https://isocpp.org/wiki/faq/pointers-to-members#fnptr-vs-memfnptr-types, especially [33.1] Is the type of "pointer-to-member-function" different from "pointer-to-function"?

提交回复
热议问题