试编写函数判断计算机的字节存储顺序是开序(lit
16 查阅
参考答案:
bool IsBigendian()
\r\n
{
unsigned short usData = 0x1122;
unsigned char *pucData = (unsigned
char*)&usData;
return (*pucData == 0x22);
}
参考答案:
bool IsBigendian()
\r\n
{
unsigned short usData = 0x1122;
unsigned char *pucData = (unsigned
char*)&usData;
return (*pucData == 0x22);
}