struct member alignment
From: Jana Andropov (asdf_at_asdf.com)
Date: 01/19/05
- Next message: Ananda: "Re: Recommendations for authoring tools for Windows Installer"
- Previous message: Arkady Frenkel: "Re: Compile IPv6 Client for Windows XP"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 19 Jan 2005 08:38:20 -0500
hi all,
i'm having a problem with struct member alignment settings in dev studio 6.
it's currently set to the default which is 8 byte alignment, however,
despite this fact i'm still unable to calculate
what "sizeof" will return when i call it on my structs even though i know
its aligning to 8 byte boundaries.
definition from documentation (/Zp):
each structure member after the first is stored on either the size of the
member type or n-byte boundaries (where n is 1, 2, 4, 8, or 16), whichever
is smaller
eg.
struct aaa
{
int x;
double y;
int z;
};
sizeof returns a size of 24. i dont know why. can someone explain this to
me?
- Next message: Ananda: "Re: Recommendations for authoring tools for Windows Installer"
- Previous message: Arkady Frenkel: "Re: Compile IPv6 Client for Windows XP"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
Loading