複製(拷貝)構造函數的使用

#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
相關文章
相關標籤/搜索