//如果字节序为big-endian,返回true;反之为little-endian,返回false
bool isBig_Endian()
{
unsigned short x = 0x1234;
if(*(unsigned char*)&x == 0x12)
{
return true;
}
return false;
}
//如果字节序为big-endian,返回true;反之为little-endian,返回false
bool isBig_Endian()
{
unsigned short x = 0x1234;
if(*(unsigned char*)&x == 0x12)
{
return true;
}
return false;
}
一、基本概念位的概念:在计算机中,一个0或1称为一位(bit)。字节:连续的八位称为一个字节(Byte),字节是计算机中可个字符一个字
在各种计算机体系结构中,对于字节、字等的存储机制有所不同,因而引发了计算机
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M