有如下程序: #include <iostream> using namespace std; class point {int x,y; public:point(i
有如下程序: #include <iostream> using namespace std; class point { int x, y; public: point(int vx, int vy ) { x = vx; y = vy; } point () { x = 0; y = 0; } point operator+(point pl ) { point p; int px = x + p1.x; int py = y + p1.y; return point(px, py ); } point operator-(point p1 ) { point p; int px = x - p1.x; int py = y - p1.y; return point(px, py ); } void print() { cout<<x<<", "<<y<<end1; } }; int main () { point pl (10, 10 ), p2 (20, 20 ); p1 = p1 + p2; p1.print (); return 0; } 执行后的输出结果是()。
A.10,10
B.20,20
C.10,20
D.30,30