Operator Overloading in C++

What is operator overloading? Operator overloading is compile time polymorphism. Operator overloading provides a flexible option for the creation of new definitions for most of the C++ operators. We can overload all the C++ operators except the following: Class members access operator (. , .*) Scope resolution operator ( : : ) Size operator(sizeof) Conditional operator ( ? : ) Although the semantics of an operator can be extended, we can’t change its syntax, the grammatical rules that govern its use such as the no of operands precedence and associativity.…

Read More