设为首页 加入收藏

TOP

1.3.3 保留字
2013-10-07 14:14:00 来源: 作者: 【 】 浏览:61
Tags:1.3.3 保留

1.3.3  保留字

C++(www.cppentry.com)程序中,保留字又称为关键字,是有特定含义的单词,这些标识符对C++(www.cppentry.com)编译程序有着特殊的含义。对于保留字,在编程(www.cppentry.com)时不能用于其他用途。表1-1中列出了常用的保留字,其含义和用法在相关的章节中再做详细介绍。

表1-1  C++(www.cppentry.com)常用保留字

asm< xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

auto

bool

break

case

catch

char

class

const

continue

default

delete

do

double

else

enum

extern

false

float

for

friend

goto

if

inline

int

long

main

namespace

new

operator

private

protected

public

register

return

short

signed

sizeof

static

struct

switch

template

this

throw

true

try

typedef

typeied

typename

union

unsigned

using

virtual

void

volatile

while

说明:读者在定义标识符的时候,不能定义与表1-1中同名的标识符,否则在程序运行时将出现错误。


】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇1.5.2 编译运行 下一篇1.2.2 C与C++的比较

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: