struct TestPoint3d
{
union
{
struct
{
unsigned int x:1;
unsigned int y:1;
unsigned int z:30;
};
unsigned int loc;
};
};
int main()
{
test.loc = 6;
/*
*如果返回true 那么表示小端,否则为大端
*/
bool isLittleEnd = (x ? false : true);
}
struct TestPoint3d
{
union
{
struct
{
unsigned int x:1;
unsigned int y:1;
unsigned int z:30;
};
unsigned int loc;
};
};
int main()
{
test.loc = 6;
/*
*如果返回true 那么表示小端,否则为大端
*/
bool isLittleEnd = (x ? false : true);
}