当前位置:嗨网首页>书籍在线阅读

02-C++关键字

  
选择背景色: 黄橙 洋红 淡粉 水蓝 草绿 白色 选择字体: 宋体 黑体 微软雅黑 楷体 选择字体大小: 恢复默认

B.1 C++关键字

关键字是组成编程语言词汇表的标识符,它们不能用于其他用途,如用作变量名。表B.1列出了C++关键字,其中以粗体显示的关键字也是ANSI C99标准中的关键字,而以斜体显示的关键字是C++11新增的。

表B.1 C++关键字

| alignas | alignof | asm | auto | bool | | :----- | :----- | :----- | :----- | :----- | :----- | :----- | | break | case | catch | char | char16_t | | char32_t | class | const | const_cast | constexpr | | continue | decltype | default | delete | do | | double | dynamic_cast | else | enum | explicit | | export | extern | false | float | for | | friend | goto | if | inline | int | | long | mutable | namespace | new | noexcept | | nullptr | operator | private | protected | public | | register | reinterpret_cast | return | short | signed | | sizeof | static | static_assert | static_cast | struct | | switch | template | this | thread_local | throw | | true | try | typedef | typeid | typename | | union | unsigned | using | virtual | void | | volatile | wchar_t | while |