The foo object is written to a new file on platform 1 as follows:
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 problems can arise when loading foo on platform 2?
source share