C++中的const_cast
摘要:
#include<iostream>#include<string>using namespace std; int main(){ const int num=1; int *p=const_cast<int *>(&num); *p=2; cout<<num<<endl;//输出1 cout<<*p<<... 阅读全文
posted @ 2009-09-26 23:39 ATAK 阅读(249) 评论(0) 推荐(0) 编辑