ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
You need to pass the class pointer along with the callback:
ros::Subscriber sub = n.subscribe("chatter", 1000, &listener::chatterCallback, this);
2 | update |
You need to pass the class pointer along with the callback:
ros::Subscriber sub = n.subscribe("chatter", 1000, &listener::chatterCallback, this);
EDIT: I missed the fact that you are compiling on Windows. I have no idea if that interface is officially supported on VS2010.
Your work-around is not really a solution. If you actually want to use ROS on Windows, please open a defect ticket so the maintainers know their code does not work with your compiler.