On Thu, 17 Mar 2005 18:23:19 -0000, mguo <[EMAIL PROTECTED]> wrote:
I am using CodeWarrior8.3. I have a following structure, when i use "sizeof" on this structure, it returns 12, but i expect 8.
Just because you 'expect' something, it doesn't need to be correct ;)
Does anybody know why? Thanks, -mguo
Alignment.
Probably you have sruct-alignment in the project panel set to 68k-4Byte. You might try 68k instead.
There's also a pragma to set the alignment: #pragma options align= alignment
(search for 'align' in the online manual to get the allowed values)
(I use CW 9.x but it should apply to 8.x too)
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
