const问题
书上一段:const int ci=0;
const int *p=&ci;//convert address of non-const to address of a const
后面注释的address of non-const对吗?ci不是const吗?
2012-08-09 10:14
2012-08-09 16:30
2012-08-09 23:37
2012-08-11 08:20
2012-08-11 08:21
程序代码:const int ci = 1; int i = 2; const int *p; p = &ci; // OK p = &i; // OK *p = 3; // error i = 3; // OK
2012-08-11 11:13
2012-08-11 20:41
2012-08-11 21:15
2012-08-11 21:52
2012-08-11 22:38