大小尾端数据测试 参考自《程序员面试攻略》一般也就想到bool endianess(){int testNum=1;char *ptr=(char *)&testNum;return (*ptr);}作者提出用union的方法好聪明!bool endianess(){union{int theInteger;char singleByte;}endianT 编程 2023-11-28 117 点赞 1 评论 177 浏览