CCCPaste

Untitled

#include 

using namespace std;

class Point {
private:
    int x, y;
    
public:
    Point() {
        
    }
    Point(int x, int y) {
        this->x = x;
        this->y = y;
    }
    
    Point & operator += (Point tmp) {
        this->x += tmp.x;
        this->y += tmp.y;
        
        return *this;
    }
    Point & operator -= (Point tmp) {
        this->x -= tmp.x;
        this->y -= tmp.y;
        
        return *this;
    }
    Point & operator *= (Point tmp) {
        this->x *= tmp.x;
        this->y *= tmp.y;
        
        return *this;
    }
    Point & operator /= (Point tmp) {
        this->x /= tmp.x;
        this->y /= tmp.y;
        
        return *this;
    }
    void print() {
        cout << this->x << " " << this->y << endl;
    }
};

int main() {
       
    Point p1(1, 2);
    Point p2(2, 3);
    p1 /= p2;
    
    
    
    p1.print();
    
    return 0;
}