指针问题。输出结果为什么都是一样?

#include <iostream> using namespace std; int main() { int *p1=new int; cout<<p1<<endl; delete p1; long *p2=new long; //其实这里指向的是int的空间 cout<<p2<<endl; cout<<p1<<endl; *p2=3; cout<<*p1<<endl; //输出3 cout<<*p2<<endl; //输出3 delete p2; }运行一看,前面3个输出结果一样。后面2两个输出结果也一样,为什么输出结果一样呀?该怎么解决?