How to create a header declaration for the following function
Hi everyone,
I am trying to separate the main and the class into a .cpp and .h file from the cv_bridge tutorial code provided here: link:text
When I type:
void imageCallback(const sensor_msgs::ImageConstPtr& original_image);
in my .h file, I get the following compile error:
/home/jay/fuerte/sandbox/ucl_drone/src/imagestream/../header/webcam.h:7:26: error: ‘sensor_msgs’ does not name a type
/home/jay/fuerte/sandbox/ucl_drone/src/imagestream/../header/webcam.h:7:53: error: expected unqualified-id before ‘original_image’
/home/jay/fuerte/sandbox/ucl_drone/src/imagestream/../header/webcam.h:7:53: error: expected ‘)’ before ‘original_image’
/home/jay/fuerte/sandbox/ucl_drone/src/imagestream/../header/webcam.h:7:39: error: expected ‘;’ at end of member declaration
/home/jay/fuerte/sandbox/ucl_drone/src/imagestream/../header/webcam.h:7:53: error: ‘original_image’ does not name a type
Usually this works but perhaps the syntax should be different when using the :: ? Thanks.
Where do you include the ROS headers?
I have a folder called 'header' within my workspace and I add the .cpp file to my CMakeLists.txt file
Sorry, I meant the " #include <ros ros.h="">" and those
I had them in the main. I just put them in the .h file where they should have been. Thanks for the help!