Hello,
I'm reading and writing data to a file like:
How can I ensure that other architectures (and OSes) can read it? ie 32 or 64bit versions of my program? Should I be writing each byte in a certain order? Or maybe some define, like int32_t ?Code:int c = 10; /* ... */ fp = fopen("file.dat", "wb"); fwrite(&c, sizeof(c), 1, fp); /* read by later ... (not by the same program that made it necessarily) */
thanks