C++关键字
(1)asm
asm 已经被__asm 替代了,用于汇编语言嵌入在 C/C++程序里编程,从而在某些方面优化代码。虽然用 asm 关键
字编译时编译器不会报错,但是 asm 模块的代码是没有意义的。
(2)auto
这个这个关键字用于声明变量的生存期为自动,即将不在任何类、结构、枚举、联合和函数中定义的变量
视为全局变量,而在函数中定义的变量视为局部变量。这个关键字不怎么多写,因为所有的变量默认就是
auto 的。
(3)bad_cast,const_cast,dynamic_cast,reinterpret_cast,static_cast
关于异常处理的,还不是太了解..
(4)bad_typeid
也是用于异常处理的,当 typeid 操作符的操作数 typeid 为 Null 指针时抛出.
(5)bool
不用多说了吧,声明布尔类型的变量或函数。
(6)break
跳出当前循环。The break statement terminates the execution of the nearest enclosing loop or
conditional statement in which it appears。
(7)case
switch 语句分支。Labels that appear after the case keyword cannot also appear outside a
switchstatement.
(8)catch,throw,try
都是异常处理的语句,The try, throw, and catch statements implement exception handling。
(9)char
声明字符型变量或函数。
(10)class
声明或定义类或者类的对象。The class keyword declares a class type or defines an object of a
class type。
页 1