Big/Little endian

int v = 0x0D0C0B0A;
char* c = (char*)&v;
if (*c == 0x0A) cout << "little endian";
else cout << "big endian";
posted @ 2019-07-14 22:13  Lightmonster  阅读(135)  评论(0编辑  收藏  举报