文章分类 -  C++

摘要:class father{public: father(){ x=new int;cout<<"father constructor running\n";}~father(){ delete x;cout<<"father destructor running\n";}private: int *x;};class son :public father{ public : son(){ y= new y;cout<<"son constructor running\n";}~son(){ dele 阅读全文
posted @ 2012-04-08 11:41 hackj 阅读(192) 评论(0) 推荐(0)