版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/baobingji/article/details/84923720
1、判断大小端
bool isBigEndian()
{
unsigned int test=0x1234;
if(*((unsigned char *)&test) == 0x12)
{
return true;
}
else
{
return false;
}
}
1、判断大小端
bool isBigEndian()
{
unsigned int test=0x1234;
if(*((unsigned char *)&test) == 0x12)
{
return true;
}
else
{
return false;
}
}