今天在上看到的 自己改进了一下发出来小端输出1 大端输出0union { int i; char c[4]; } test; test.i = 1; cout << int(test.c[0]) << endl;