ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

If its just a mater of converting a std::string to a double, it does get easier than using boost::lexical_cast as follows

#include <boost/lexical_cast.hpp>
...
std::string str; // keep the string here
double result = boost::lexical_cast<double>(str);

have fun

If its just a mater of converting a std::string to a double, it does doesn't get easier than using boost::lexical_cast as follows

#include <boost/lexical_cast.hpp>
...
std::string str; // keep the string here
double result = boost::lexical_cast<double>(str);

have fun