title: Function call missing argument list to create pointer
body: <p>I tried to connect my app to OpenViBE through VRPN server. My app works well until I try to add code to connect my app to VRPN server.</p>
  
  <p>My code looks like this:</p>
  
  <p><code>MainWindow.c</code> code:</p>
  
  <pre><code>#include "mainwindow.h"
  #include "ui_mainwindow.h"
  #include &lt;QtUiTools/QUiLoader&gt;
  #include &lt;QFile&gt;
  #include &lt;QMessageBox&gt;
  #include &lt;QFileDialog&gt;
  
  #include &lt;iostream&gt;
  using namespace std;
  
  #include "vrpn_Analog.h"
  
  MainWindow::MainWindow(QWidget *parent) :
      QMainWindow(parent),
      ui(new Ui::MainWindow)
  {
      ui-&gt;setupUi(this);
  
      currentImage = 0;
      labelSize = ui-&gt;label_2-&gt;size();
  
      createActions();
      openFileDialog();
  }
  void MainWindow::checkChannels()
  {
      vrpn_Analog_Remote *vrpnAnalog = new vrpn_Analog_Remote("Mouse0@localhost");
      vrpnAnalog-&gt;register_change_handler( 0, handle_analog );
  }
  
  
  void VRPN_CALLBACK MainWindow::handle_analog( void* userData, const vrpn_ANALOGCB a )
  {
   int nbChannels = a.num_channel;
  
   cout &lt;&lt; "Analog : ";
  
   for( int i=0; i &lt; a.num_channel; i++ )
   {
   cout &lt;&lt; a.channel[i] &lt;&lt; " ";
   }
  
   cout &lt;&lt; endl;
  }
  </code></pre>
  
  <p><code>MainWindow.h</code> code:</p>
  
  <pre><code>#ifndef MAINWINDOW_H
  #define MAINWINDOW_H
  
  #include &lt;QMainWindow&gt;
  #include &lt;QFileInfoList&gt;
  
  #include "vrpn_Analog.h"
  
  namespace Ui {
  class MainWindow;
  }
  
  class MainWindow : public QMainWindow
  {
      Q_OBJECT
  
  public:
      explicit MainWindow(QWidget *parent = 0);
      ~MainWindow();
  
  protected:
      void resizeEvent(QResizeEvent *);
  
  private slots:
      void openFileDialog();    
  
  private:    
      void checkChannels();
  
      void VRPN_CALLBACK handle_analog( void* userData, const vrpn_ANALOGCB a );
  
  };
  
  #endif // MAINWINDOW_H
  </code></pre>
  
  <p>With this code, when I try to run my app I get:</p>
  
  <pre><code>error: C3867: 'MainWindow::handle_analog': function call missing argument list; use '&amp;MainWindow::handle_analog' to create a pointer to member
  </code></pre>
  
  <p>I try to edit code by error advice, but I get another error:</p>
  
  <pre><code>error: C2664: 'vrpn_Analog_Remote::register_change_handler' : cannot convert parameter 2 from 'void (__stdcall MainWindow::* )(void *,const vrpn_ANALOGCB)' to 'vrpn_ANALOGCHANGEHANDLER'
  There is no context in which this conversion is possible
  </code></pre>
  
  <p>I search around, but I don't find any usable solution.</p>
  
  <p>Methods <code>checkChannels</code> and <code>handle_analog</code> I "copy" from this code, where all works fine:</p>
  
  <pre><code>#include &lt;QtCore/QCoreApplication&gt;
  #include &lt;iostream&gt;
  #include "vrpn_Analog.h"
  
  
  void VRPN_CALLBACK vrpn_analog_callback(void* user_data, vrpn_ANALOGCB analog)
  {
      for (int i = 0; i &lt; analog.num_channel; i++)
      {
          if (analog.channel[i] &gt; 0)
          {
  
              std::cout &lt;&lt; "Analog Channel : " &lt;&lt; i &lt;&lt; " / Analog Value : " &lt;&lt; analog.channel[i] &lt;&lt; std::endl;
          }
      }
  }
  
  int main(int argc, char *argv[])
  {
      QCoreApplication a(argc, argv);
  
      /* flag used to stop the program execution */
      bool running = true;
  
      /* VRPN Analog object */
      vrpn_Analog_Remote* VRPNAnalog;
  
      /* Binding of the VRPN Analog to a callback */
      VRPNAnalog = new vrpn_Analog_Remote("openvibe_vrpn_analog@localhost");
      VRPNAnalog-&gt;register_change_handler(NULL, vrpn_analog_callback);
  
      /* The main loop of the program, each VRPN object must be called in order to process data */
      while (running)
      {
          VRPNAnalog-&gt;mainloop();
      }
  
      return 0;
  
      return a.exec();
  }
  </code></pre>
  
  <p>Where I'm doing mistake? Thanks for all replies.</p>