2010年3月25日 星期四

Check Endianness

1bool isLittleEndian(){
2    const WORD endian = 0x1234;
3    return *((BYTE*)&endian) == 0x34;
4}