Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export module my_point;
- export class Point {
- public:
- int x, y;
- Point(int x = 0, int y = 0) : x(x), y(y) {}
- Point operator+(const Point& other) const {
- return Point(x + other.x, y + other.y);
- }
- Point operator-(const Point& other) const {
- return Point(x - other.x, y - other.y);
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement