• 2022-07-22
    下面为一个点类,重载了负号运算符,将原来点改为其关于原点的对称点。 请填空补充完整程序。 #include [iostream.h][br][/br] class Point{ private: float x; float y; public: Point(){ x = 0; y = 0; } Point(float a, float b){ x = a; y = b; } // 显示坐标 void display() { cout << "X: " << x << " Y:" << y <
  • 举一反三