#include <iostream>
using namespace std;
int main(){
int* ptr1 = new int(1);
int* ptr2 = ptr1;
cout << *ptr1 << endl;
cout << *ptr2 << endl;
delete ptr1;
cout << *ptr2 << endl;
return 0;
}
MOOC清华《面向对象程序设计》第8章:悬挂指针实验
最新推荐文章于 2018-11-10 22:02:58 发布