标签:
#include <arpa/inet.h>
int isBigEndian()
{
int flag = 0;
short a = htons(0x0102);
char* p = &a;
if(*p==0x01)
{
flag = 1;
}
return flag;
}
int isBigEndian()
{
int flag = 0;
short a = 0x0102;
char* p = &a;
if(*p==0x01)
{
flag = 1;
}
return flag;
}
标签:
原文地址:http://www.cnblogs.com/ZhangJinkun/p/4529890.html