The confuse of binary orders of writing struct into binary file with fwrite in C
Advertisements I am trying to use fwrite to write struct into binary file, but the bytes order of the binary file really confuses me. The struct is as follow: (gdb) p data[0]@10 $1 = {{alphCount = 58, ascii = 97 ‘a’}, {alphCount = 1, ascii = 10 ‘\n’}, {alphCount = 31, ascii = 98 ‘b’},… Read More The confuse of binary orders of writing struct into binary file with fwrite in C