Im trying to read an int from a binary file.. (As I have done many times before)
int chunkLength=0; fileRead.read (reinterpret_cast<char*>(&chunkLength),sizeof(chunkLength));
I know (and can see) that the file contains the bytes 00 00 00 0D, so to the best of my knowledge the int should be 13 dec after the read.
BUT it contains 0D 00 00 00 or 218103808 in dec..
Why/how does this reversal happen????
Thanks for any comment on this small issue.