The signature of the first two methods are
When you implement the second method, you should use the first one.RGB& operator+=(RGB const& rhs); // Changes this object, so it is non-const method, and return reference to this object which is the result. RGB operator+(RGB const& rhs) const; // No changes to this object, so it is a const method, and return an (temparary) object which is the result.
Having done above, you can go one step further-- This time dealing with index overflow, i.e., the given row or col value is not in the appropriate range.
1.3.6