What is an unsigned char?

后端 未结 17 1436
借酒劲吻你
借酒劲吻你 2020-11-22 11:05

In C/C++, what an unsigned char is used for? How is it different from a regular char?

17条回答
  •  说谎
    说谎 (楼主)
    2020-11-22 11:22

    Some googling found this, where people had a discussion about this.

    An unsigned char is basically a single byte. So, you would use this if you need one byte of data (for example, maybe you want to use it to set flags on and off to be passed to a function, as is often done in the Windows API).

提交回复
热议问题