
please wait
|
|
|
|
|
|
|
|
|
|
|
|
A file is a packed list of records. Each record is a variable length, byte-aligned object. Multibyte integer values are stored in network-byte order (MSB first, LSB last). String values are stored as ASCIIZ. Unless otherwise noted, they are variable-length and terminated by a single zero byte. BYTE OFFSET .. SIZE .. TYPE .. MEANING 0...... .. 4... .. sint .. day 4...... .. 4... .. sint .. month 8...... .. 4... .. sint .. year 12.... .. ?... .. strz .. category ?..... .. ?... .. strz .. description (immediately follows 'category') |
|
|
|
|
out.write( event.day.c , 4 );
The exact alignment and order of the members of a union in memory is platform dependant. Therefore be aware of possible portability issues with this type of use. |
out.write( event.day.c, 4 );
out.write( &event.day, 4 );
// Always write an integer in (for this example) network byte order
|
|