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(&ival), sizeof ival);
Of course, after you read it, you may need to byte swap for correct endian representation.