C++保留的关键字

来源:互联网 发布:新网站seo 编辑:程序博客网 时间:2024/05/19 01:08
关键字是预先保留的标识符,每个关键字都有特殊的含义。我们不能在程序中使用与关键字同名的标识符。以下是C++所保留的关键字:

asm[1]
 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
 while

  

注:array不是关键字

1 0
原创粉丝点击