1.使用const应该注意:
- const修饰的变量不能改变
- const必须初始化
- 用一个对象初始化另外一个对象,则它们是不是const都无关紧要。
1 int i = 42; 2 const int ci = i; 3 int j = ci;
标签:初始化,ci,const,int,42,对象 From: https://www.cnblogs.com/Sandals-little/p/17316838.html
1.使用const应该注意:
1 int i = 42; 2 const int ci = i; 3 int j = ci;
标签:初始化,ci,const,int,42,对象 From: https://www.cnblogs.com/Sandals-little/p/17316838.html