|
From: Carlos d. M. <cg...@wo...> - 2002-06-10 19:27:08
|
I have the variable double doubvar = 747675.57576;
fstream file;
file.open("archivo.txt", ios::out);
file << doubvar << endl;
file.close();
I read the file with notepad and the number lost the decimals!
And the same with cout << doubvar!
It does not happen with fprintf(file, "%lf", doubvar);
The same with long double, but with long double printf prints
-0.0000000.
????????.
_______________________________________________
|Notepad archivo.txt________________________ _ 0 X |
|747675
|
|
|
|_______________________________________________|
P.S. My Dev-C++ 4.01 (and 4.00) has the generate makefile option in the
project popup menu.
|