I saw all the examples saying to use
As many digits are written as needed to represent the integral part, followed by the decimal-point character and six decimal digits.
string s = std::to_string(6.61914e+6);
If this number of digits after decimal point is not enough you can use
std::ostringstream str; str << std::fixed << std::setprecision(digits) << 6.61914e+6; std::string s = str.str();