int* pInt = new int; *pInt = 5; cout << "---------------" << endl; cout << "&(*pInt)-->" << &(*pInt) << endl; cout << "pInt-->" << pInt << endl; cout << "&pInt-->" << &pInt << endl; delete pInt; cout << "---------------" << endl; //cout << "*pInt-->" << *pInt << endl; cout << "pInt-->" << pInt << endl; cout << "&pInt-->" << &pInt << endl; pInt = nullptr; cout << "---------------" << endl; //cout << "*pInt-->" << *pInt << endl; cout << "pInt-->" << pInt << endl; cout << "&pInt-->" << &pInt << endl;
输出
---------------
&(*pInt)-->00947918
pInt-->00947918
&pInt-->0078FA4C
---------------
pInt-->00008123
&pInt-->0078FA4C
---------------
pInt-->00000000
&pInt-->0078FA4C
标签:--,0078FA4C,C++,---------------,int,pointer,pInt From: https://www.cnblogs.com/fengzhengfly/p/18080076