I have the function prototype in .h file as:
myClass & operator+ (const myClass & myClassInst) const;
and the implementation in .cpp file:
myClass& myClass::operator+ (const myClass &myClassInst) const
{
return *this;
}
However, when I compile, I get the following message:
error C2440: 'return' : cannot convert from 'const class myClass' to 'class
myClass &'
I am a little bit confused by *this here, and I simply couldn't make things correct. Does anybody know how to fix the error here?
Thanks in advance!