title: Reference to non-static member function must be called
body: <p>I'm using C++ (not C++11). I need to make a pointer to a function inside a class. I try to do following:</p>
  
  <pre><code>void MyClass::buttonClickedEvent( int buttonId ) {
      // I need to have an access to all members of MyClass's class
  }
  
  void MyClass::setEvent() {
  
      void ( *func ) ( int ); 
      func = buttonClickedEvent; // &lt;-- Reference to non static member function must be called
  
  }
  
  setEvent();
  </code></pre>
  
  <p>But there's an error: "Reference to non static member function must be called". What should I do to make a pointer to a member of MyClass?</p>