I'm trying to take strings from vectors and convert them into doubles using stringstream. However, when I run this code:
double tempDob;
stringstream ss;
ss << tempVec[3];
ss >> tempDob;
I get weird stuff instead of a normal double. Here's an example: Original Strings(cout of tempVec[3]):
15000000
62658722.54
91738635.67
20
29230756.5
12
Converted doubles(cout of tempDob):
1.5e+07
6.26587e+07
9.17386e+07
2.92308e+07
4.70764e+07
3.53692e+07
How can I get these strings correctly converted to doubles through stringstream? Thanks!