double to string c++

C++
std::ostringstream strs;
strs << dbl;
std::string str = strs.str();
Source

Also in C++: