判斷系統內存存儲是大端還是小端

1、判斷大小端 bool isBigEndian() { unsigned int test=0x1234; if(*((unsigned char *)&test) == 0x12) { return true; } else { return false; } }
相關文章
相關標籤/搜索