标签: c++ c operating-system
如何知道我们的系统遵循小端或大端?
答案 0 :(得分:2)
int n = 1; // little endian if true else big endian if(*(char *)&n == 1) {...}