Colon operator in a variable declaration statement inside struct [duplicate]
Possible Duplicate:
What does 'unsigned temp:3' means
struct sample{
int x :2;
char y :4;
};
What does the colon operator do in the above code?
It is used to specify bit fields. The size of the field is given in bits. The layout is compiler-specific.
精彩评论