The problem of reading (with c++ program) binary file generated by fortran code has been asked many times and the satisfactory description of conventions in fortran records has
operator>>
is the formatted input operator. It is used to read text files, converting the textual representation to binary.
You should be reading using unformatted input operations. Try this:
file.read(reinterpret_cast<char*>(&ival), sizeof ival);
Of course, after you read it, you may need to byte swap for correct endian representation.
Open it in a hex editor and dig out the structure. Is the header size 16, 32, 64 or 128 bits and which end up is it?
Hex editor..