3.459583967924D-05
I have this number above stored in a text file. I extract the value in a string and convert it to a double value and get the number below.
3.45958396792399
The number should actually read : 0.0000345958396792
The code below is what i used to convert it from string to double.
1 2 3 4 5 6 7 8 9 10 11 12
|
double GetDblVal(string strConvert) {// Converts string into double
istringstream stm;
cout<<setiosflags(ios::fixed | ios::showpoint | ios::right) << setprecision(18);
double dblReturn =0.0000000;
stm.str(strConvert);
stm >> dblReturn;
return(dblReturn);
}
|
Any suggestions on how i should handle the string with the number " 3.459583967924D-05 " stored in it?
Last edited on
oh em gee, you stole my name :P