C++大端小端测试

int one = 1;
int bigendian = (*(char *)&one == 0);

你可能感兴趣的:(c++)