#include "Vector.h" Vector::Vector(double x, double y) : x(x) , y(y) { } Vector Vector::operator+(const Vector& other) const { return Vector(x + other.x, y + other.y); } std::ostream& operator<<(std::ostream& output, const Vector& vector) { return output << '(' << vector.x << ',' << vector.y << ')'; } int main() { Vector v1(-2, 4); Vector v2(3); std::cout << v1 << " + " << v2 << " = " << v1 + v2 << std::endl; return 0; }