Taken from cplusplus.com tutorial:
My question is: why do we return a CVector& and not just CVector? Could someone please explain it to me in detail?Code:CVector& CVector::operator= (const CVector& param) { x=param.x; y=param.y; return *this; }
Taken from cplusplus.com tutorial:
My question is: why do we return a CVector& and not just CVector? Could someone please explain it to me in detail?Code:CVector& CVector::operator= (const CVector& param) { x=param.x; y=param.y; return *this; }
Name: Miguel Martins
Date of birth: 14th August 1987
"He who hesitates is lost."