c++的const的用法
摘要:
1 #include <iostream> 2 using namespace std; 3 int main() 4 { 5 int a = 10; 6 const int b = 20; 7 int *const p = &a; 8 *p = 30; 9 cout<<"a:"<<a<<" b:"<<b<<" *p:"<<*p<<endl;10 return 0;11 }1.const类型的指针。此处的指针p是const类型,其本 阅读全文
posted @ 2012-01-06 11:03 快跑蜗牛 阅读(168) 评论(0) 推荐(0) 编辑