An object foo is written to a new file on platform 1 as:
write( file, &myFoo, sizeof(struct foo) );
…and then read on platform 2 using:
read(file, &myFoo, filesize(file) );
The foo object has the following definition:
struct foo
{
char a;
int b;
long c;
char* d;
};
What kind of issues might arise when loading foo on platform 2?
When you do this you need to watch out for:
charis the only one you can trust)ASCIIvsEBCDIC? (yeah, seriously ?)