我有以下由 VC 2005 编译的结构:
typedef struct
{
unsigned int a :8;
unsigned int b :8;
unsigned int c :8;
union
{
unsigned int val1 :8;
unsigned int val2 :8;
} d;
} MyStruct_T;
MyStruct_T strct;
在观察窗口中:
&strct.a = 0x0019ff0c
&strct.b = 0x0019ff0d
&strct.c = 0x0019ff0e
&strct.d = 0x0019ff10 // <- Why not 0x0019ff0f ?
谢谢。