> I've seen this advice several times on newsgroups and in the SDK
> documentation - the question is how do you know where to pad and how much?
> Does anyone have an example?
>
struct MyClassData
{
REALstring someString;
REALstring someOtherString;
#ifndef WIN32
RGBColor myColor
#else
COLORREF myColor
char padding1[2] <--- Here we needed padding because COLORREF
is 4 bytes and RGBColor is 6
#endif
Boolean myBoolean;
int myInt;
};
--
______________________________________________________________________
Björn Eiríksson bjorn at einhugur dot com
Einhugur Software einhugur at kagi dot com
http://www.einhugur.com
______________________________________________________________________
Einhugur Software has sold its products in 39 countries world wide.
______________________________________________________________________
For support: support at einhugur dot com
For bug reports: bugs at einhugur dot com
To post on the maillist: einhugur at yahoogroups dot com
|