c++ float to striong code example
Example 1: cpp float to string
#include <sstream>
//..
std::ostringstream ss;
ss << myFloat;
std::string s(ss.str());
Example 2: c++ std string to float
std::string num = "0.6";
double temp = ::atof(num.c_str());
std::cout << temp << std::endl;
// Output: 0.6