to_wstring truncates double value to 6 decimal places

  • Thread starter Thread starter HotIndigo
  • Start date Start date
H

HotIndigo

Guest
I'm using the following code:

double dDecimal = .00000001324;
wstring wDecimal = to_wstring(dDecimal);


The resulting wDecimal string is "0.000000" and not "0.00000001324" as one would expect. Any ideas as to why this is and how I can get the correct string equivalent in wDecimal?

HotIndigo.

Continue reading...
 
Back
Top