My problem is that the operator+=(Base&) is called instead of the other one. Any suggestions?Code:Base& Base::operator+=(Base& e) { } Base& Base::operator+=(Derived& e) { } int main() { Base *x, z; Derived y; z += y; }
My problem is that the operator+=(Base&) is called instead of the other one. Any suggestions?Code:Base& Base::operator+=(Base& e) { } Base& Base::operator+=(Derived& e) { } int main() { Base *x, z; Derived y; z += y; }
Last edited by ygfperson; 05-03-2003 at 03:56 PM.