第二章++基础知识 2.1C++的词法单位 2.2C++中的数据类型 2.3常量和变量 2.4数组与字符数组 2.5运算符、表达式和语句 2.6简单的输入输出
第二章 C++基础知识 2.1 C++ 的 词 法 单 位 2.5 运算符、表达式和语句 2.6 简 单 的 输 入 输 出 2.4 数 组 与 字 符 数 组 2.3 常 量 和 变 量 2.2 C++ 中 的 数 据 类 型
2.1C++的词法单位 C++的字符集 2.1.2关键字 2.1.3标识符(ID, identifier) 2.1.4标点符号
2.1 C++的词法单位 2.1.1 C++ 的 字 符 集 2.1.2 关 键 字 2.1.3 标识符(ID,identifier) 2.1.4 标 点 符 号
2.1.1C++的字符集 26个 abcdefghijklmnopqrstuvwxyz 小写母 26个 ABCDEFGHIJKLMNOPQRSTUVXY 大写母 10个 0123456789 阿拉伯数 其他号+*/=,:;?1…-|1#%&0A<>空格
2.1.1 C++的字符集 26个 小写字母 abcdefghijklmnopqrstuvwxyz 26个 大写字母 ABCDEFGHIJKLMNOPQRSTUVWXY Z 10个 阿拉伯数字 0123456789 其他符号 + - * / = , . _ : ; ? \ " ' ~ | ! # % & () [] {} ^ < > 空格
2.1.2关键字 表2-1C++常用关键字及分类 数据类型说明 bool char wchar t class const double enum float 符与修饰符 int long short signed struct union unsigned void volatile 存储类型说明 符 auto extern inline register static 访问说明符 Friend private protected public 其它说明符 asm operator template this typedef virtual break case catch continue default do else 语句与标号 for goto if return switch throw try while 运算符及逻辑 delete false new sizeof true
2.1.2 关 键 字 数据类型说明 符与修饰符 bool char wchar_t class const double enum float int long short signed struct union unsigned void volatile 存储类型说明 符 auto extern inline register static 访问说明符 Friend private protected public 其它说明符 asm operator template this typedef virtual 语句与标号 break case catch continue default do else for goto if return switch throw try while 运算符及逻辑 值 delete false new sizeof true 表2-1 C++常用关键字及分类
2.1.2关键字 Vc++中还有一些专用的关键字,它们都 以双下划线开头: asm based cdecl emit export fastcall fortran huge interrupt loads multipile inheritance near pascal__saveregs segment self signal_inheritance steal virtual inheritance
2.1.2 关 键 字 VC++中还有一些专用的关键字,它们都 以双下划线开头: _ _asm _ _based _ _cdecl _ _emit _ _export _ _far _ _fastcall _ _fortran _ _huge _ _interrupt _ _loadds _ _multipile_inheritance _ _near _ _pascal _ _saveregs _ _segment _ _self _ _signal_inheritance _ _stdcall _ _virtual_inheritance