title: registerPointPickingCallback (PCLViewer::callback_Test,(void*)&viewer); returns C3687 non-standard syntax; use '&' to create a pointer to member
body: <p>I am trying to use the point clicking callback of PCLvisualizer. The code uses the QVTKwidget to show the PCLvisualizer in a qt GUI. The project below compiles fine and works but when  I include this code to set up a callback: </p>
  
  <pre><code> // ERROR MESSAGE OCCURS HERE !
    viewer-&gt;registerPointPickingCallback (PCLViewer::callback_Test,(void*)&amp;viewer);
  </code></pre>
  
  <p>then this error message shows: </p>
  
  <blockquote>
    <p>error: C3867: 'PCLViewer::callback_Test': non-standard syntax; use '&amp;'
    to create a pointer to member</p>
  </blockquote>
  
  <p>Just to test the callback I made a public function callback_Test() that just prints to qDebug </p>
  
  <pre><code>void PCLViewer::callback_Test()
  {
      qDebug() &lt;&lt; "callback_Test executed";
  }
  </code></pre>
  
  <p>What is wrong with my code? </p>
  
  <p>This is my code:</p>
  
  <pre><code>#include "pclviewer.h"
  #include "../build/ui_pclviewer.h"
  
  PCLViewer::PCLViewer (QWidget *parent) :
    QMainWindow (parent),
    ui (new Ui::PCLViewer)
  {
    ui-&gt;setupUi (this);
    this-&gt;setWindowTitle ("PCL viewer");
  
    // Setup the cloud pointer
    cloud.reset (new PointCloudT);
    // The number of points in the cloud
    cloud-&gt;points.resize (200);
  
    // The default color
    red   = 128;
    green = 128;
    blue  = 128;
  
    // Fill the cloud with some points
    for (size_t i = 0; i &lt; cloud-&gt;points.size (); ++i)
    {
      cloud-&gt;points[i].x = 1024 * rand () / (RAND_MAX + 1.0f);
      cloud-&gt;points[i].y = 1024 * rand () / (RAND_MAX + 1.0f);
      cloud-&gt;points[i].z = 1024 * rand () / (RAND_MAX + 1.0f);
  
      cloud-&gt;points[i].r = red;
      cloud-&gt;points[i].g = green;
      cloud-&gt;points[i].b = blue;
    }
  
    // Set up the QVTK window
    viewer.reset (new pcl::visualization::PCLVisualizer ("viewer", false));
    ui-&gt;qvtkWidget-&gt;SetRenderWindow (viewer-&gt;getRenderWindow ());
    viewer-&gt;setupInteractor (ui-&gt;qvtkWidget-&gt;GetInteractor (), ui-&gt;qvtkWidget-&gt;GetRenderWindow ());
    ui-&gt;qvtkWidget-&gt;update ();
  
    viewer-&gt;addPointCloud (cloud, "cloud");
    viewer-&gt;setPointCloudRenderingProperties (pcl::visualization::PCL_VISUALIZER_POINT_SIZE, 2, "cloud");
    viewer-&gt;resetCamera ();
    ui-&gt;qvtkWidget-&gt;update ();
  
    // ERROR MESSAGE OCCURS HERE !
    viewer-&gt;registerPointPickingCallback (PCLViewer::callback_Test,(void*)&amp;viewer);
  }
  
  PCLViewer::~PCLViewer ()
  {
    delete ui;
  }
  
  void PCLViewer::callback_Test()
  {
      qDebug() &lt;&lt; "callback_Test executed";
  }
  </code></pre>
  
  <p>This is my headerfile:</p>
  
  <pre><code>#ifndef PCLVIEWER_H
  #define PCLVIEWER_H
  
  #include &lt;iostream&gt;
  
  // Qt
  #include &lt;QMainWindow&gt;
  #include &lt;QDebug&gt;
  
  // Point Cloud Library
   #include &lt;pcl/point_cloud.h&gt;
  //#include &lt;C:\Program Files\PCL 1.8.0\include\pcl-1.8\pcl\point_cloud.h&gt;
  #include &lt;pcl/point_types.h&gt;
  //#include &lt;C:\Program Files\PCL 1.8.0\include\pcl-1.8\pcl\point_types.h&gt;
  #include &lt;pcl/visualization/pcl_visualizer.h&gt;
  //#include &lt;C:\Program Files\PCL 1.8.0\include\pcl-1.8\pcl\visualization\pcl_visualizer.h&gt;
  
  // Visualization Toolkit (VTK)
  #include &lt;vtkRenderWindow.h&gt;
  //#include &lt;C:\Program Files\VTK\include\vtk-7.1\vtkRenderWindow.h&gt;
  
  
  
  typedef pcl::PointXYZRGBA PointT;
  typedef pcl::PointCloud&lt;PointT&gt; PointCloudT;
  
  namespace Ui
  {
    class PCLViewer;
  }
  
  class PCLViewer : public QMainWindow
  {
    Q_OBJECT
  
  public:
    explicit PCLViewer (QWidget *parent = 0);
    ~PCLViewer ();
     void callback_Test();
  
  public slots:
  
  protected:
    boost::shared_ptr&lt;pcl::visualization::PCLVisualizer&gt; viewer;
    PointCloudT::Ptr cloud;
  
    unsigned int red;
    unsigned int green;
    unsigned int blue;
  
  private:
    Ui::PCLViewer *ui;
  
  };
  
  #endif // PCLVIEWER_H
  </code></pre>