N
nass
hello everyone, i have my struct
which is declared locally inside a case of a switch statement of a
function...
don't let Q_UINT8 scare you its just an platform independent Qt 3-3-4,
8bits (1 byte) integer type (and for all practical matter i did try to
use char as well instead of Q_UINT8).. the MANUAL_* variables are just
some globals of type unsigned char..
struct manualStruct {
Q_UINT8 mC1St;
Q_UINT8 mC2St;
Q_UINT8 mC3St;
} *manualVar;
manualVar->mC1St=MANUAL_cap1State;
manualVar->mC2St=MANUAL_cap2State;
manualVar->mC3St=MANUAL_cap3State;
int structSize1=sizeof(manualVar);
now my problem is that sizeof() returns 4... ie 4bytes... how is that
possible? should it not be 3? i repeat i even tried that with chars..
the problem remained...
thank you in advance for your help
nass
which is declared locally inside a case of a switch statement of a
function...
don't let Q_UINT8 scare you its just an platform independent Qt 3-3-4,
8bits (1 byte) integer type (and for all practical matter i did try to
use char as well instead of Q_UINT8).. the MANUAL_* variables are just
some globals of type unsigned char..
struct manualStruct {
Q_UINT8 mC1St;
Q_UINT8 mC2St;
Q_UINT8 mC3St;
} *manualVar;
manualVar->mC1St=MANUAL_cap1State;
manualVar->mC2St=MANUAL_cap2State;
manualVar->mC3St=MANUAL_cap3State;
int structSize1=sizeof(manualVar);
now my problem is that sizeof() returns 4... ie 4bytes... how is that
possible? should it not be 3? i repeat i even tried that with chars..
the problem remained...
thank you in advance for your help
nass