1.申明一个引用,不能为空,必须同时进行初始化。
例如 “: int &reiv ; //err
2.const常量赋值时,必须同时进行初始话
例如: const double di; //err
3.int &n=m; //n是m的引用reference,m是被引用物 referent ,n相当于m的别名。
4.局部数组和全局数组
char c[ ] = “hello world” ; //分配一个局部数组
char *c = "hello world"; //分配一个全局数组
1.申明一个引用,不能为空,必须同时进行初始化。
例如 “: int &reiv ; //err
2.const常量赋值时,必须同时进行初始话
例如: const double di; //err
3.int &n=m; //n是m的引用reference,m是被引用物 referent ,n相当于m的别名。
4.局部数组和全局数组
char c[ ] = “hello world” ; //分配一个局部数组
char *c = "hello world"; //分配一个全局数组