struct stTest
{
union
{
struct
{
unsigned char byOne;
unsigned char byTwo;
};
unsigned int feature;
};
};
int _tmain(int argc, _TCHAR* argv[])
{
stTest test;
test.feature = 1;
printf("%d %d\n", test.byOne, test.byTwo); // 1 0
return 0;
}
{
union
{
struct
{
unsigned char byOne;
unsigned char byTwo;
};
unsigned int feature;
};
};
int _tmain(int argc, _TCHAR* argv[])
{
stTest test;
test.feature = 1;
printf("%d %d\n", test.byOne, test.byTwo); // 1 0
return 0;
}