using来定义类的别名,typedef,#define
时间:2019-12-12 23:56:17
收藏:0
阅读:190
宏定义:其实就是替换作用
#define TRUE 1 //结尾无分号,宏名TRUE,计算机会把所有TRUE替换为1.
typedef:定义类的别名
tpyedef unsigned int UInt; //unsigned int类的别名UInt
C++11中,用using来定义类的别名:
using UInt = unsigned int; //更清晰
原文:https://www.cnblogs.com/xixixing/p/12032235.html
评论(0)