Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "point.h"
- Point::Point(int _x, int _y) : x(_x), y(_y)
- {
- }
- std::ostream& operator<<(std::ostream& s, const Point& p) {
- s << "x: " << p.x << ", y: " << p.y;
- return s;
- }
- Point& operator-(const Point& p1, const Point& p2) {
- return Point(p1.x - p2.x, p1.y - p2.y);
- }
Add Comment
Please, Sign In to add comment