Possible Duplicate:
What does 'unsigned temp:3' means
I’m a newbie to c/c++ and I have this code running on linux and win32
typedef struct tMessageAction
{
unsigned char ActionId : 4;
unsigned short ID : 10;
}tMessageAction;
so what are the single colons doing to this variables?
are they specifying how many bits are going to be used?
is this related to some type of structure alignment attribute?
The colons are defining a bitfield. They do not change the alignment rules.