union V{ struct X{ unsigned char s1:2; unsigned char s2:3; unsigned char s3:3; }x; unsigned char c; }v;
对于结构体X中表示s1占用字节的0-1,s2占用字节的2-4,s3占用字节的5-7位
时间: 2024-09-29 18:28:20
union V{ struct X{ unsigned char s1:2; unsigned char s2:3; unsigned char s3:3; }x; unsigned char c; }v;
对于结构体X中表示s1占用字节的0-1,s2占用字节的2-4,s3占用字节的5-7位