how to convert a double to a string c++ code example Example: double to string c++ std::ostringstream strs; strs << dbl; std::string str = strs.str();