Operator overloading in C++ (Unary operator overloading)
Computer Gyan
Operator overloading is used to accomplish the work of the operator on the objects of class. The main advantage of using operator overloading in a program are that it is much easier to read and debug. We use Operator as function with the help of operator overloading . The unary operators operate on a single operand and following are the examples of Unary operators − The increment (++) and decrement (--) operators. The unary minus (-) operator. The logical not (!) operator. The operators :: (scope resolution), . (member access), .* (member access through pointer to member), and ?: (ternary conditional), New operators such as **, angled brackets, or &| cannot be overloaded. Types of operator overloading Binary operator overloading Unary operator overloading
music information: You’re free to use this song in any of your videos, but you must include the following in your video description: I Am a Man Who Will Fight for Your Honor by Chris Zabriskie is licensed under a Creative Commons Attribution license (https://creativecommons.org/licenses/by/4.0/) Source: http://chriszabriskie.com/honor/ Artist: http://chriszabriskie.com/ ... https://www.youtube.com/watch?v=969O4oqrtQ8
63107447 Bytes