I am having some issues trying to convert a double to C++ string. Here is my code
std::string doubleToString(double val) { std::ostringstream out; ou
#include using namespace std; // ... out << fixed << val; // ...
You might also consider using setprecision to set the number of decimal digits:
setprecision
out << fixed << setprecision(2) << val;