求C++关键字介绍解释大全?
C++中关键字有哪些,求C++关键字介绍解释大全?
各个版本的ISO C++都规定以下划线接大写字母或下划线起始的标识符保留给实现,编译器可以用这些保留标识符作为扩展关键字,这不保证可移植性。 C++98/03 关键字 ISO C++98/03关键字共63个,此处严格按标准原文排版: 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 unsigned catch explicit namespace static_cast using char export new struct virtual class extern operator switch void const false private template volatile const_cast float protected this wchar_t continue for public throw while default friend register true delete goto reinterpret_cast try [1-2] 关键字的改变 C++11 关键字共73个。
新增关键字:alignas、alignof、char16_t、char32_t、constexpr、decltype、noexcept、nullptr、static_assert、thread_local。[3] auto 的意义改变。
[4] register 被视为过时的(可能在未来标准移除)。[5] export 因为实现支持太少(仅Edison Design Group的前端支持),编译效率低下,取消原有意义(仍是关键字,但使用它的程序是错误的),改为保留给未来标准使用。
亲爱的希望我的回答帮到您给个好评哦谢谢 好像没有必要知道32个关键字的意思吧。。。。编程学习在于循序渐进,变量命名时只有不触犯一些关键字就行了。。。如果用好的命名规则一般是不会触犯的系统
答:同意楼上的说法。一般字符串用字符型数组或字符指针实现。VC++里可以使用srting类型。这个新类型可以方便地实现字符串合并等常用操作。详情>>