linyawen

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2012年3月7日

摘要: 转自:http://blog.solrex.cn/articles/%E6%85%8E%E7%94%A8const_cast.htmlProgram:#include <iostream>using namespace std;int main(){const int a = 1;int *p = const_cast<int*>(&a);*p = 2;cout << “value a=” << a << endl;cout << “value *p=” << *p << endl;cout 阅读全文
posted @ 2012-03-07 00:30 linyawen 阅读(260) 评论(0) 推荐(0) 编辑