What does 'u' mean after a number?

前端 未结 4 1750
情话喂你
情话喂你 2020-12-28 12:54

Can you tell me what exactly does the \'u\' after a number, for example:

#define NAME_DEFINE 1u 
4条回答
  •  庸人自扰
    2020-12-28 13:33

    it means "unsigned int", basically it functions like a cast to make sure that numeric constants are converted to the appropriate type at compile-time.

提交回复
热议问题