#include<iostream> using namespace std; class Human { private: int *i; public: Human(){cout<<"构造函数执行中..."<<endl;i=new int(999);} ~Human(){cout<<"析构函数执行中..."<<endl;delete i;} int get(){return *i;} }; int main() { Human Jack; cout<<Jack.get()<<endl; Human *p=new Human; cout<<p->get()<<endl; delete p; return 0; }