C++ 关键字

点击下表以进入具体释义

__abstract 2 __alignof Operator __asm
__assume __based __box 2
__cdecl __declspec __delegate 2
__event __except __fastcall
__finally __forceinline __gc 2
__hook 3 __identifier __if_exists
__if_not_exists __inline __int16
__int32 __int64 __int8
__interface __leave __m128
__m128d __m128i __m64
__multiple_inheritance __nogc 2 __noop
__pin 2 __property 2 __raise
__sealed 2 __single_inheritance __stdcall
__super __thiscall __try/__except__try/__finally
__try_cast 2 __unaligned __unhook 3
__uuidof __value 2 __virtual_inheritance
__w64 __wchar_t, wchar_t abstract
array auto bool
break case catch
char class const
const_cast continue decltype
default delegate delete
deprecated 1 dllexport 1 dllimport 1
do double dynamic_cast
else enum enum class
enum struct event explicit
extern false finally
float for for each, in
friend friend_as gcnew
generic goto if
initonly inline int
interface class interface struct interior_ptr
literal long mutable
naked 1 namespace new
new noinline 1 noreturn 1
nothrow 1 novtable 1 nullptr
operator private property
property 1 protected public
ref class ref struct register
reinterpret_cast return safecast
sealed selectany 1 short
signed sizeof static
static_assert static_cast struct
switch template this
thread 1 throw true
try typedef typeid
typeid typename union
unsigned using declaration, using directive uuid 1
value class value struct virtual
void volatile while

根据其内容可将其细分一下:

基本的数据类型关键字:void, int, char, float, double, bool

类型修饰关键字:long, short, singed, unsigned

布尔型字面值:true, false

非常重要的变量声明修饰符:const, inline

存储类别关键字:auto, static, extern, , register

控制结构关键字:for, while, if, else, do

switch语句关键字:switch, case, default

路径跳转关键字:break, continue, return, goto

动态创建变量关键字:new, delete

长度运算符:sizeof

复合类型关键字:class, struct, enum, union, typedef

与类成员相关关键字:this, friend, virtual, mutable, explicit, operator

派生类继承方式:private, protected, public

模板:template, typename

命名空间:namespace, using

异常处理:catch, throw, try,

各种操作符的替代名:and, and_eq, bitand, bitor, compl, not, not_eq, or, or_eq, xor, xor_eq

其他不常用的:asm, export, typeid, volatile

在cena中time 是保留的 如果拿 time 做变量名 会 无法编译

——以上部分内容摘自网络及Microsoft MSDN

——尽量不要用英文全拼 可以用缩写 或者把首字母大写 还有很多方法避免掉坑里的 比如:用汉语拼音

C++关键字(保留字)的更多相关文章

  1. 用oracle建表,必须注意Oracle 关键字(保留字)

    Oracle 关键字(保留字) 大全   转 其实这个东西可以在oracle 上输入一个sql语句就可以得到: select * from v$reserved_words order by keyw ...

  2. 2020重新出发,JAVA入门,关键字&保留字

    关键字 & 保留字 关键字(或者保留字)是对编译器有特殊意义的固定单词,不能在程序中做其他目的使用. 关键字具有专门的意义和用途,和自定义的标识符不同,不能当作一般的标识符来使用.例如, cl ...

  3. js基础 1.简单js 语法 关键字 保留字 变量

    简单js JavaScript 是一个松散性的语言 对象属性却不想c中的结构体或者c++ 和java的对象, 对象继承机制 使用原型的prototype(原型链),js的分为三部分ECMAScript ...

  4. java关键字 保留字

    Java 关键字和保留字 Java 关键字列表 (依字母排序 共51组): abstract, assert,boolean, break, byte, case, catch, char, clas ...

  5. Java标识符,关键字,保留字三者区分(主要是从官网摘抄)

    区分 标识符(Identifiers) An identifier is an unlimited-length sequence of Java letters and Java digits, t ...

  6. C语言:标识符 关键字 保留字 表达式 语句

    标识符(Identifier)标识符就是程序员自己起的名字,符号常量(宏).变量名.函数名.宏名.结构体名等,它们都是标识符.遵守规范:C语言规定,标识符只能由字母(A~Z, a~z).数字(0~9) ...

  7. PostgreSQL中关于关键字(保留字)在表名和字段名中的应用文件解决

    标识符和关键词 受限标识符或被引号修饰的标识符.它是由双引号(")包围的一个任意字符序列.一个受限标识符总是一个标识符而不会是一个关键字.因此"select"可以用于引用 ...

  8. Mysql 关键字-保留字

    ADD ALL ALTER ANALYZE AND AS ASC ASENSITIVE BEFORE BETWEEN BIGINT BINARY BLOB BOTH BY CALL CASCADE C ...

  9. mybatis/tk mybatis下实体字段是关键字/保留字,执行报错

    实体如下: import com.fasterxml.jackson.annotation.JsonFormat; import com.xxx.web.bean.PagesStatic; impor ...

  10. Mysql 关键字-保留字(转帖)

    2008-02-01 10:51 ADD ALL ALTER ANALYZE AND AS ASC ASENSITIVE BEFORE BETWEEN BIGINT BINARY BLOB BOTH ...

随机推荐

  1. python 类装饰器

    class Test(): def __init__(self, func): print('装饰器1') self.__func = func def __call__(self): print(' ...

  2. bzoj 4975: [Lydsy1708月赛]区间翻转【博弈论】

    必败状态是倒序排列,也就是正序对为0 然后发现,每次翻转都是有奇数个数对(\( C_{4x+2}^{2} C_{4x+3}^{2} \) 都是奇数),所以每次翻转丢回改变正反数对的奇偶性 又因为偶数为 ...

  3. Python递归实现遍历目录

    import os filePath = "/Users/busensei/wzy/filePath/" def read(filePath, n): it = os.listdi ...

  4. 题解报告:hdu 1392 Surround the Trees(凸包入门)

    Problem Description There are a lot of trees in an area. A peasant wants to buy a rope to surround a ...

  5. Zernike矩之图像重建(附源码)

    源码下载 参考: [1] Teague M R. Image analysis via the general theory of moments[J]. JOSA, 1980, 70(8): 920 ...

  6. ios NSFileManager 用法详解

    转自:http://blog.csdn.net/ios_che/article/details/7287266 iPhone文件系统NSFileManager讲解是本文要介绍的内容,主要是通过ipho ...

  7. LVS实现负载均衡

    三台主机模拟 sishen_63(分发器): eth0(Bridge):192.168.1.63 eth1(vmnet4):192.168.2.63 sishen_64(RealServer1): e ...

  8. php多文件上传类(含示例)

    在网上看到一个比较好的多文件上传类,自己改良了下,顺便用js实现了多文件浏览,php文件上传原理都是相同的,多文件上传也只是进行了循环上传而已,当然你也可以使用swfupload进行多文件上传! &l ...

  9. php url地址栏传中文乱码解决方法集合

     php地址栏传中文$_GET下来后乱码,urlencode和urldecode,iconv,base64_encode等方法,整理基本是常用的了. php地址栏传中文$_GET下来后乱码,urlen ...

  10. iOS 应用程序内部国际化,不跟随系统语言

    前言:网络上关于iOS国际化的文章很多,但基本上都是基于跟随系统语言的国际化,笔者就不赘述了-0 – 今天要讲的是不跟随系统的切换语言版本方案,即程序内部的切换语言版本方案. 一.总则: 应用内部语言 ...