Big/Little endian

int v = 0x0D0C0B0A;
char* c = (char*)&v;
if (*c == 0x0A) cout << "little endian";
else cout << "big endian";
原文地址:https://www.cnblogs.com/lightmonster/p/11186104.html