Unary operators overloading in C++
It’s operate on the object for which they were called and normally, this operator appears on a left side of the object, as in !obj, -obj, and ++obj but sometime they can be used as postfix as well like obj++ or obj–.
• The increment (++) and decrement (–) operators.
• The unary minus (-) operator.
• The logical not (!) operator.