C++中 unsigned short和byte有啥区别?

解决方案 »

  1.   

    C++没有byte,Windows.h有个宏定义BYTE为unsigned charunsigned short和unsigned char,一个无符号短整型,2字节,范围0~65535;一个无符号字节型,1字节,范围0~255
      

  2.   

    Type Name          Bytes       Other Names                          Range of Values unsigned __int16   2           unsigned short, unsigned short int   0 to 65,535 BYTE
     Byte (8 bits). This type is declared in WinDef.h as follows:
    typedef unsigned char BYTE;