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