I have a small problem with stringstream. It loses precision when I use it to convert string to double.
const std::string str = "44.23331002";
double x;
stringstream ss;
ss << str;
ss >> x;
cout << str << " = " << x << endl;
The output is: 44.23331002 = 44.2333
Why is this? Does it convert to float and has limited digit precision?