23,116
社区成员
发帖
与我相关
我的任务
分享
#include <iostream>
using namespace std;
int main()
{
const int i = 10;
int* p = const_cast<int*>(&i);
cout << hex << p << endl;
cout << hex << &i << endl;
*p = 100;
cout << *p << endl;
cout << *((int*)&i) << endl;
return 0;
}