Overloading the Arithmetic Operators

I can’t figure it out, why do I get this error
Error (active) E0289 no instance of constructor "Point::Point" matches the argument list argument types are:(int)
I use Visual studio.

Point::Point(int x, int y) : x(x), y(y){}
Point Point::operator+(const Point& other) const
{
	return Point(x + other.x), (y + other.y);
}

Extra parentheses.

Point Point::operator+(const Point& other) const
{
	return Point(x + other.x, y + other.y);
}
1 Like