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. vs code 代码格式化

    1.打开vs code > 文件 > 首选项 > 设置 > 将下面一段粘贴在右侧即可 // Place your settings in this file to overwr ...

  2. (水题)洛谷 - P1478 - 陶陶摘苹果(升级版)

    https://www.luogu.org/problemnew/show/P1478 没啥好说的…… 居然还漏写一个等于号WA了一发. #include<bits/stdc++.h> u ...

  3. jzoj5980. 【WC2019模拟12.27】字符串游戏

    首先发现双方可以有一个默契,不管谁刻意,都可以把串变为诸如\(...101010101...\)的形式 所以先手要赢的话就是要在上面的基础之上加一个字符使其变为要求的子串 那么就是要求的子串中相邻两个 ...

  4. 函数和代码复用 --Python

    1.关于递归函数的描述,以下选项中正确的是 A.包含一个循环结构 B.函数比较复杂 C.函数内部包含对本函数的再次调用 D.函数名称作为返回值 答案:D 答案解析:递归函数是指函数内部包含对本函数的再 ...

  5. pip 安装出现提示

    The directory '/home/zdj/.cache/pip/http' or its parent directory is not owned by the current user a ...

  6. 题解报告:poj 1738 An old Stone Game(区间dp)

    Description There is an old stone game.At the beginning of the game the player picks n(1<=n<=5 ...

  7. oracle 函数、聚焦函数

    oracle 常用的函数 以及 聚焦函数 --1,字符函数 --当没有表可以用个的时候oracle自带一个虚表dual -- || 表示连接符号 将字符串连接到一起 式显示 Lower(char):将 ...

  8. 解决Eclipse自动补全变量名的问题

    原文地址: https://blog.csdn.net/czh500/article/details/53162157

  9. AJPFX总结java InputStream读取数据问题

    1. 关于InputStream.read()     在从数据流里读取数据时,为图简单,经常用InputStream.read()方法.这个方法是从流里每次只读取读取一个字节,效率会非常低.     ...

  10. python绘图工具包 matplotlib 中文乱码问题

    环境: python2.7 windows 8.1 解决: 改配置文件,把字体改为支持中文的字体. 找到python安装目录下的 \Lib\site-packages\matplotlib\mpl-d ...