What does a colon in a struct declaration mean, such as :1, :7, :16, or :32?

Viewed 7865

What does the following C++ code mean?

unsigned char a : 1; 
unsigned char b : 7;

I guess it creates two char a and b, and both of them should be one byte long, but I have no idea what the ": 1" and ": 7" part does.

3 Answers
Related