内存地址相同的两个不同的值
#include <iostream>using namespace std;int main() {
const int N = 22;
int * pN = const_cast<int*>(&N);
*pN = 33;
cout << N << '\t' << &N << endl;
cout << *pN << '\t' << pN << endl;}
22 0x22ff74
33 0x22ff74
喵喔喔
缥缈止盈
qq_花开花谢_0
相关分类