I have the structure below compiled by 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;
In the watch window:
&strct.a = 0x0019ff0c
&strct.b = 0x0019ff0d
&strct.c = 0x0019ff0e
&strct.d = 0x0019ff10 // <- Why not 0x0019ff0f ?
Thanks.