c++程序设计相关
大学相关C++#include using namespace std; class Point { public: Point(int x=0,int y=0):XX(x),YY(y) {} Point operator+(const Point &a2) const; Point operator-(const Point &a2) const; void display() const; private: int XX; int YY; }; Point Point::operator+(const Point &a2) const{ return Point(XX+a2.XX,YY+a2.YY)程序设计相关
用户评论