宏定义:其实就是替换作用

#define TRUE 1    //结尾无分号,宏名TRUE,计算机会把所有TRUE替换为1.

typedef:定义类的别名

tpyedef unsigned int UInt; //unsigned int类的别名UInt

C++11中,用using来定义类的别名:

using UInt = unsigned int; //更清晰

相关文章:

  • 2022-03-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-28
  • 2021-05-17
  • 2022-12-23
  • 2021-07-27
猜你喜欢
  • 2021-07-21
  • 2021-12-23
  • 2022-12-23
  • 2021-09-05
  • 2021-06-12
  • 2022-12-23
相关资源
相似解决方案