Hi, I have overloaded the =operator in the Base class. And derived a class as below. As per my knowldge the =operator is not inherited to derived. But if i.
Overloading the Assignment Operator in Derived Classes. If it weren't used explicitly, this->operator=(rhs) would call the derived class operator=.
In the C++ programming language, the assignment operator, '=', is the operator used for assignment. Like most other operators in C++, it can be overloaded. The copy.
Assignment Operator Derived Class C++
C++: Overloading Derived Class Assignment Copying parent class members If there is a parent (base) class, those fields must also be copied. You can accomplish this.
FAQ: I'm creating a derived class; should my assignment operator call my base class's assignment operator? ←(in the new Super-FAQ) It's in Section: Assignment operators.