C++关键字全集整合 其实最好还是在MSDN 里查阅C++ keywords,但是整一遍还是可以加深点印象.以下注解多引自MSDN Library for Visual Studio2008. C++关键字全集(这个是从C++ Primer copy过来的,有一些补充,也有一些已经被替代): asm auto bad_cast bad_typeid bool break case catch char class const const_cast continue default delete do double dynamic_cast else enum except explicit extern false finally float for friend goto if inline int long mutable namespace new operator private protected public register reinterpret_cast return short signed sizeof static static_cast struct switch template this throw true try type_info typedef typeid typename union unsigned using virtual void volatile wchar_t while (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 switch statement. (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. (11)const 被const 修饰的东西都受到强制保护,可以预防意外的变动...