复制(拷贝)构造函数的使用

#include<iostream> using namespace std; class point { private: int x,y; public: point(int a=0,int b=0)//定义构造函数 {x=a;y=b;} point(point &p);//声明复制构造函数 int getx() {return x;} int gety() {return y;} }; po
相关文章
相关标签/搜索