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