8、1 标识符的作用域

分为三种:

Class scope, Local scope, Global scope, Namespace scope

Name precedence:

Local identifier > Global identifier

要注意Namespace的用法。在新的C++标准中的应用。

8、2 变量的生命期

Automatic varible, Static varible

8、3 接口的设计

是要求进行值传递还是引用传递

Global Constant(全局静态变量)

8、4 返回值的函数

Boolean Function:

<cctype>

int isalpha(ch) 判断是否是字母,是则返回非零值

int isalnum(ch) 判断是否是数字或字母

int isdigit(ch) 判断是否是数字

int islower(ch) 判断是否是小写字母

int isspace(ch) 判断是否是空白符,如空格,换行,缩进,回车,换页符

int isupper(ch) 判断是否是大写字母

相关文章: