摘要: 方式一 使用两个静态字节,代码较长 方式二 使用三个静态字节,代码简短 1 bool is_big_endian1(){ 2 static union tmp_u{ 3 tmp_u():s(0x0100){} 4 short s; 5 char b; 6 } tmp; 7 8 return tmp. 阅读全文
posted @ 2021-11-28 08:58 蜗牛牛 阅读(43) 评论(0) 推荐(0)