<Imperfect C++>里面有详细的关于“13.1. May I Have a byte? ””给我一个字节“的讨论,十分有意思
具体可以参考此书,这里只写一下结论:
说到底,C++并不提供所谓的真正一个BYTE的数据类型,只不过unsigned char 被视为了通常的替代品
<Imperfect C++>里的选段:
Unfortunately, there is no byte type in C/C++, and so the common practice in such cases is to use char. This makes sense, since the size of char is always one byte. The (C++-98) standard does not say this directly, but it does say (C++-98: 5.3.3) that "the sizeof operator yields the number of bytes in the object representation of its operand" and "sizeof(char), sizeof(signed char) and sizeof(unsigned char) are 1." Clearly, then, sizeof(char) == sizeof(byte) must always be true. (Note that a byte is not necessarily 8 bits, just that it is "large enough to fit the basic character set" [C++-98: 3.9.1.1].