I have a float value that needs to be put into a std::string. How do I convert from float to string?
std::string
float val = 2.5; std::string my_val = val;
You can use std::to_string in C++11
float val = 2.5; std::string my_val = std::to_string(val);