C++中的關(guān)鍵保留字

一種好記的方法,根據(jù)內(nèi)容進(jìn)行劃分。

根據(jù)內(nèi)容細(xì)分為:

基本的數(shù)據(jù)類型關(guān)鍵字:void, int, char, float, double, bool

類型修飾關(guān)鍵字:long, short, singed, unsigned

布爾型字面值:true, false

非常重要的變量聲明修飾符:const, inline

存儲(chǔ)類別關(guān)鍵字:auto, static, extern, , register

控制結(jié)構(gòu)關(guān)鍵字:for, while, if, else, do

switch語句關(guān)鍵字:switch, case, default

路徑跳轉(zhuǎn)關(guān)鍵字:break, continue, return, goto

動(dòng)態(tài)創(chuàng)建變量關(guān)鍵字:new, delete

長(zhǎng)度運(yùn)算符:sizeof

復(fù)合類型關(guān)鍵字:class, struct, enum, union, typedef

與類成員相關(guān)關(guān)鍵字:this, friend, virtual, mutable, explicit, operator

派生類繼承方式:private, protected, public

模板:template, typename

命名空間:namespace, using

異常處理:catch, throw, try,

各種操作符的替代名:and, and_eq, bitand, bitor, compl, not, not_eq, or, or_eq, xor, xor_eq

其他不常用的:asm, export, typeid, volatile

引用:https://tieba.baidu.com/p/1967754662

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

推薦閱讀更多精彩內(nèi)容