In C++, like other functions, assignement operator function is inherited in derived class.
For example, in the following program, base class assignment operator function can be accessed using the derived class object.
Output: base class assignment operator called
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- Self assignment check in assignment operator
- What all is inherited from parent class in C++?
- Copy constructor vs assignment operator in C++
- When should we write our own assignment operator in C++?
- Default Assignment Operator and References
- vector::operator= and vector::operator[ ] in C++ STL
- deque::operator= and deque::operator in C++ STL
- Why overriding both the global new operator and the class-specific operator is not ambiguous?
- Operator Overloading '<<' and '>>' operator in a linked list class
- Operands for sizeof operator
- Rules for operator overloading
- Result of comma operator as l-value in C and C++
- Comma operator should be used carefully
- C/C++ Ternary Operator - Some Interesting Observations
- Can we use % operator on floating point numbers?
- Scope Resolution Operator Versus this pointer in C++?
- Set a variable without using Arithmetic, Relational or Conditional Operator
- Placement new operator in C++
- Operator Overloading in C++
- Overloading Subscript or array index operator  in C++