+ 1
What do this ":" does
I was looking at some c code..Where i saw this: struct bg_cfg { u8 bg_id:2; u16 charbase:2; u16 screenbase:5; }; So , what actually : in bg_id:2 is for? NOTE: u8 , u16 is unsigned char and unsigned short int respectively.
1 Odpowiedź
+ 1
found the answer. BITFIELD..
https://www.tutorialspoint.com/cprogramming/c_bit_fields.htm