Reading a fortran file
I have a file written in Fortran (77) as "unformated".
Not only was it written in Fortran, but on a unix system.
I am now trying to read in the doubles out of the file in MS VC++.
I know the byte size of each (both 8 luckily), and I think I know where all the buffering etc is, so I'm pretty sure I know the exact eight bytes to take out of the file to get my double.
But when I look at the result, it's nothing like the number I'm expecting. I think this might be to do with bifferent bits (eg for sign, mantissa...) being in different places in the 8 bytes, but I'm not sure, and don't know what to do if it is.
Maybe the bytes are swapped on the unix machine. So byte 1 should be byte 8, byte 2 should be byte 7, etc.