C++关键字

Posted on 2021-07-03 11:24  Cookieboy  阅读(83)  评论(0)    收藏  举报

关键字是C++中预先保留的单词(标识符)

在定义变量或者是常量的时候,不要用到关键字

C++的关键字参考如下

asm   do if return typedef
auto double inline short typeid
bool dynamic_cast int signed typename
break else long sizeof union
case enum mutable static unslgned
catch explicit namespace static_cast using
char export new struct virtual
class extern operator switch void
const false private template volatile
const_cast fioat protectecd this wchar_t
continue for public throw while
default friend regiter true  
delete goto reinterpret_cast try  

提示:在给变量或者变量起名的时候,不要用C++关键字,否则会产生歧义