Operator overloading

struct Point { 
public:
    int x;
    int y;

    Point operator +(const Point & p){
        return {x + p.x, y + p.y};
    }

    void operator +=(Point p){
        x += p.x;
        y += p.y;
    }
};

Point p1 {11};
Point p2 {22};
Point p3 = p1 + p2;
//p3.x is 3 and p3.y is 3
cout << p3.x << "; " << p3.y << endl;

p3 += {35};
//p3.x is 6 and p3.y is 8
cout << p3.x << "; " << p3.y;