Declaration inside the class:
Integer operator+ (const Integer& right);
Definition outside the class:
Integer operator+ (const Integer& left, const Integer& right)
{
return left ;
}
What sense does it make for the compiler to enforce different number arguments in declaration and definition?
You declared two different
operator+there. The correct out-of-class definition would be this: