M**********n 发帖数: 432 | 1 How to read binary(data) file generated by Fortran in C/C++?
Is it possible? If possible how to realize it?
The binary file generated by Fortran is a double precision data file.
I have tried to use read binary file in C++, but have problem. The following
is my C++
code.
double temp=0.0;
ifstream File("bin.data",ios::in|ios::binary);
File.read((char *) &temp, sizeof(double));
cout<
The number that has been read out does not make any sense.
Anybody know why? Thanks. |
|