正在加载图片...
16-2. cpp include<iostream> using namespace std include"Point h Point: Point X=Y=0; cout<< Default Constructor called. <<endl Point: Point(int xx, int yy) I XE=Xx YEyy; cout<< Constructor called, <<end Point : -Point i cout<<"Destructor called, "<<endl; y void Point Move(int x, int y) {X=x;Y=y;}//6-2.cpp #include<iostream> using namespace std; #include "Point.h" Point::Point() { X=Y=0; cout<<"Default Constructor called."<<endl; } Point::Point(int xx,int yy) { X=xx; Y=yy; cout<< "Constructor called."<<endl; } Point ::~Point() { cout<<"Destructor called."<<endl; } void Point ::Move(int x,int y) { X=x; Y=y; } 27
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有