C and c++ language bit domain considerations
- 2020-04-02 01:40:08
- OfStack
struct weiyu
{
int a:1;
int b:2;
}
A is stored in the lower part of memory, on a small-end machine.
Be especially aware of the following
Weiyu w;
W. = 1;
So this is going to be a minus 1, because it's signed. This is a sign bit.