I has read that when writing a whole struct to a file with fwrite() is bad, as it's nonportable.
But does it change anything to write the whole struct with fputc() ?
Something like this:
Won't this make just as much portability issues as the fwrite?Code:char *writePointer = &structVariable; for(int i=0; i < STRUCT_SIZE; i++) { fputc(writePointer[i], outputBuffer); }