double val = 0.1; std::stringstream ss; ss << val; std::string strVal= ss.str();
In the Visual Studio debugger, val has the value 0.
val
For anyone who gets "error: ‘setprecision’ is not a member of ‘std’" you must #include else setprecision(17) will not work!
error: ‘setprecision’ is not a member of ‘std’
#include
setprecision(17)