in reply to Opening certain files
would be 12 bytes on many 32-bit compilers, adding 3 bytes after each char to align the int on a word bounday, and to make the struct a whole number of words. You have to be aware of the padding which can vary between compilers, command-line options, and pragmas (some compilers support #pragma packed).struct mystruct { char a; int b; char c; };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Opening certain files
by locked_user sundialsvc4 (Abbot) on Nov 09, 2010 at 13:54 UTC |