I'm very new to C++, and can't figure out why I get two extra bytes when I
write this structure to a file:
struct fidoMsg::fMsg {
char msgFrom[ 36 ];
char msgTo[ 36 ];
char msgSubj[ 72 ];
char msgDate[ 20 ];
ushort timesRead;
sshort toNode;
sshort fromNode;
ushort cost;
sshort fromNet;
sshort toNet;
time_t dateWritten;
time_t dateArrived;
ushort reply;
ushort attr;
ushort unreply;
} msg;
...via:
outfile.write( msg, sizeof( fMsg ) );
The way I count, this structure should be only 190 bytes, but if I do a
sizeof( fMsg), it reports 192!
Thanks for any insight!
--- Msged/386 4.20 beta 2
---------------
* Origin: Sirius BBS * Portland, OR (503) 291-1908 * V.34 (1:105/24)
|