主观

#include ﹤iostream.h﹥

class Point

{

int X,Y;

public:

Point(int x=0, int y=0)

{

 X=x; Y=y; Countp ++;

}

Point( point &p)

{

X=p. X; Y=p.Y;

 }

~Point( )

{

 Countp--;

 }

_____________;

static int Countp;void display( )

{

 cout ﹤﹤X﹤﹤", "﹤﹤Y﹤﹤", ";

 }

};

Point myfun( Point p1, Point p2, Point p3)

{

 Point tmp(p1. X+p2. X+P3. X, p1. Y+p2.Y+p3. Y);

return tmp;

}

int Point:: Countp =0;

void main( )

{

 Point pp,p1(1,2),p2(1);

Point p=myfun(pp0, pp1, pp2);

p. display ( );

_____________; //输出Countp的值

}

参考答案
您可能感兴趣的试题
¥

订单号:

遇到问题请联系在线客服

订单号:

遇到问题请联系在线客服