registerMouseCallback generates compiler errror: non-standard syntax; use '&' to create a pointer to member (pcl_visualizer)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

registerMouseCallback generates compiler errror: non-standard syntax; use '&' to create a pointer to member (pcl_visualizer)

Mike6000
I try to use the registerMouseCallback function in pcl_vizualizer from the
example here:
http://www.pointclouds.org/documentation/tutorials/pcl_visualizer.php#pcl-visualizer

This call:
viewer->registerMouseCallback (mouseEventOccurred, (void *) &viewer);

returns the error: C3867: 'MainWindow::mouseEventOccurred': non-standard
syntax; use '&' to create a pointer to member

Can anyone spot what is wrong?



--
Sent from: http://www.pcl-users.org/
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: registerMouseCallback generates compiler errror: non-standard syntax; use '&' to create a pointer to member (pcl_visualizer)

Sérgio Agostinho
It's literally what your compiler is telling you to do.

Replace `mouseEventOccurred` with `&MainWindow::mouseEventOccurred'.

Cheers




_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users

signature.asc (836 bytes) Download Attachment