电脑桌面
添加小米粒文库到电脑桌面
安装后可以在桌面快捷访问

C++关键字大全

C++关键字大全_第1页
1/7
C++关键字大全_第2页
2/7
C++关键字大全_第3页
3/7
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 修饰的东西都受到强制保护,可以预防意外的变动...

1、当您付费下载文档后,您只拥有了使用权限,并不意味着购买了版权,文档只能用于自身使用,不得用于其他商业用途(如 [转卖]进行直接盈利或[编辑后售卖]进行间接盈利)。
2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。
3、如文档内容存在违规,或者侵犯商业秘密、侵犯著作权等,请点击“违规举报”。

碎片内容

C++关键字大全

确认删除?
VIP
微信客服
  • 扫码咨询
会员Q群
  • 会员专属群点击这里加入QQ群
客服邮箱
回到顶部