In:
struct foo { unsigned bar : 2; };
What does the ': 2' do?
It declares a bit field. The number specifies the size of that member in bits.
2.1m questions
2.1m answers
60 comments
57.0k users