C++的关键字

202 阅读1分钟

关键字也称保留字,是预先定义好的标识符,有其特殊的含义。

autobreakcasechar
constcontinuedefaultdo
doubleelseenumextern
floatforgotoif
intlongregisterreturn
shortsignedsizeofstatic
structswitchtypedefunion
unsignedvoidvolatilewhile

基本上,C语言有的C++都包含了,下面看C++特有的。

boolcatchclassconst_cast
deletedynamic_castexplicitfalse
friendinlinemutablenamespace
newoperatorprivateprotected
publicreinterpret_caststatic_cast
templatethisthrowtrue
trytypeidtypenameusing
virtualwchar_t

还有一些

asm        cdecl            far                   huge

interrupt          near             pascal             export

except            fastcall          saveregs        stdcall

seg                 syscall          fortran             thread