I just learned about bit fields and now I am wondering why they can only be applied to member variables, rather than global or function level variables.
for something like
int main(){
unsigned u : 3;
}
I get
error: expected ';' at end of declaration
unsigned u : 3
So, why do bit fields not work for variables other than members?