c++保留字

C++程序是用下列字符所组成的字
  26个小写字母:abcdefghijklmnopqrstuvwxyz
  26个大写字母:ABCDEFGHIJKLMNOPQRSTUVWXYZ
  10个数字:0 1 2 3 4 5 6 7 8 9
  其他符号 + - * / = , . _ : ; ? \ “ ‘ ~ | ! # % & ( ) [ ] { } < > (空格)

C++保留字
and             替代&&运算 alternative to && operator
and_eq      替代&=操作 alternative to &= operator
asm             插入一个汇编指令 insert an assembly instruction
auto             声明一个局部变量 declare a local variable
bitand      替代按位与运算符 alternative to bitwise & operator
bitor             替代|运营商 alternative to | operator
bool             声明一个布尔变量 declare a boolean variable
break             摆脱循环 break out of a loop
case             在一个switch语句的代码块 a block of code in a switch statement
catch             处理抛出的异常 handles exceptions from throw
char             声明一个字符变量 declare a character variable
class             声明一个类 declare a class
compl             经营者的选择〜 alternative to ~ operator
const       声明不可改变的数据或功能不更改数据 declare immutable data or functions that do not change data
const_cast      演员从const变量 cast from const variables
continue     旁路的循环迭代 bypass iterations of a loop
default     默认的处理程序在一个case语句 default handler in a case statement
delete             进行动态内存 make dynamic memory available
do             循环结构 looping construct
double             声明一个双精度浮点变量 declare a double precision floating-point variable
dynamic_cast      执行运行管型 perform runtime casts
else             候补案件的一个if语句 alternate case for an if statement
enum             创建枚举类型 create enumeration types
explicit     只使用构造完全匹配时, only use constructors when they exactly match
export             允许模板的定义是分开的声明 allows template definitions to be separated from their declarations
extern             关于变量告诉编译器定义在其它地方 tell the compiler about variables defined elsewhere
false             恒定代表布尔假值 a constant representing the boolean false value
float             声明一个浮点变量 declare a floating-point variable
for             循环结构 looping construct
friend             给予非成员函数访问私有数据 grant non-member function access to private data
goto             跳转到程序的不同部分 jump to a different part of the program
if             执行代码根据测试结果 execute code based on the result of a test
inline             优化呼吁短职能 optimize calls to short functions
int             声明一个整数变量 declare an integer variable
long             声明一个长整型变量 declare a long integer variable
mutable     重写一个const变量 override a const variable
namespace     分区的范围定义一个全局命名空间 partition the global namespace by defining a scope
new             分配新的变量动态内存 allocate dynamic memory for a new variable
not             替代! alternative to ! 经营者 operator
not_eq       替代!=操作 alternative to != operator
operator     创建重载运算符函数 create overloaded operator functions
or             替代| |操作符 alternative to || operator
or_eq       替代| =操作 alternative to |= operator
private     申报一类的私有成员 declare private members of a class
protected     申报保护的一类成员 declare protected members of a class
public             申报一类的公有成员 declare public members of a class
register     要求一个变量进行优化,速度 request that a variable be optimized for speed
reinterpret_cast改变一个变量的类型 change the type of a variable
return             从函数返回 return from a function
short             声明短整型变量 declare a short integer variable
signed             修改变量类型声明 modify variable type declarations
sizeof      返回变量或类型的大小 return the size of a variable or type
static             创建一个变量永久储存 create permanent storage for a variable
static_cast      执行nonpolymorphic演员 perform a nonpolymorphic cast
struct             定义一个新的结构 define a new structure
switch             执行代码的根据不同的变量值 execute code based on different possible values for a variable
template     创建泛型函数 create generic functions
this             对当前对象的指针 a pointer to the current object
throw             抛出一个异常 throws an exception
true             恒定代表布尔真值 a constant representing the boolean true value
try             执行代码,可以抛出一个异常 execute code that can throw an exception
typedef      创建现有类型的一个新类型名称 create a new type name from an existing type
typeid      描述一个对象 describes an object
typename    声明一类或未定义类型 declare a class or undefined type
union             一个结构,多个变量分配到相同的内存位置 a structure that assigns multiple variables to the same

memory location
unsigned     声明一个无符号整型变量 declare an unsigned integer variable
using             进口全部或部分空间到目前的范围 import complete or partial namespaces into the current scope
virtual     创建一个函数,可以通过派生类中重写 create a function that can be overridden by a derived class
void             声明职能或没有相关数据类型的数据 declare functions or data with no associated data type
volatile     警告说,关于变量编译器可以修改意外 warn the compiler about variables that can be modified

unexpectedly
wchar_t     声明一个宽字符变量 declare a wide-character variable
while             循环结构 looping construct
xor             经营者的选择^ alternative to ^ operator
xor_eq      替代^ =操作 alternative to ^= operator

原文链接: https://www.cnblogs.com/atticstudio/archive/2010/02/14/1668302.html

欢迎关注

微信关注下方公众号,第一时间获取干货硬货;公众号内回复【pdf】免费获取数百本计算机经典书籍

    c++保留字

原创文章受到原创版权保护。转载请注明出处:https://www.ccppcoding.com/archives/8186

非原创文章文中已经注明原地址,如有侵权,联系删除

关注公众号【高性能架构探索】,第一时间获取最新文章

转载文章受原作者版权保护。转载请注明原作者出处!

(0)
上一篇 2023年2月6日 下午6:54
下一篇 2023年2月6日 下午6:57

相关推荐