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.
1.4m articles
1.4m replys
5 comments
57.0k users