I read the ISO C ++ standard and I came to these bit field declarations. The following code is not entirely clear to me
struct {
char a;
int b:5,
c:11,
:0,
d:8;
struct {int ee:8;}
e;
}
Here it is indicated that the fields a, d and e.ee have different memory cells, and they can be changed independently using several threads. Bit fields b and c use the same memory cells, so they cannot be changed at the same time. I do not understand the importance of using two-bit fields for ie The c, c:11,:0,. can anyone clear my vision of this? thank
source
share