Address held by pointer changes after pointer is deleted
问题 In the following code, why is the address held by pointer x changing after the delete ? As I understand, the delete call should free up allocated memory from heap, but it shouldn't change the pointer address. using namespace std; #include <iostream> #include <cstdlib> int main() { int* x = new int; *x = 2; cout << x << endl << *x << endl ; delete x; cout << x << endl; system("Pause"); return 0; } OUTPUT: 01103ED8 2 00008123 Observations: I'm using Visual Studio 2013 and Windows 8. Reportedly