Robotics StackExchange | Archived questions

Integer to String Conversion

Hi ,

I am trying to convert an interger to string in ROS node using "itoa" but rosmake is giving me error that itoa is not in the scope

also i tried this method stringstream ss; ss<<lastReceivedOdometry.pose.pose.position.x; str = ss.str();

but it gives error "cannot convert ‘std::string’ to ‘const void’ for argument ‘2’ to ‘ssize_t send(int, const void, size_t, int)’

i just need a simple conversion from int to str

Asked by Ali Asad on 2013-03-05 10:52:47 UTC

Comments

Answers

http://codepad.org/JQt6uS5Z

Seems to work fine :)

Asked by Hansg91 on 2013-03-05 11:04:06 UTC

Comments