ROS_INFO a String
hi there, this is a question with regards to the "Writing publisher subscriber" tutorial with c++. I've realized that for strings we have to add in .c_str()
What is this .c_str() thing? We add it in when
ROS_INFO("%s", msg.data.c_str());
why cant we just.
ROS_INFO("%s", msg.data);
And i've also realized this is specific only for strings. Thanks in advanced to whoever helped me out :)
edit: I did my own personal reading and found a few resources pretty helpful in understanding this. check out https://embeddedartistry.com/blog/201...
Enjoy :)