 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you how you can implement Unary operator overloading for increment and decrement operators in C++. Before starting, you can note my information. You can connect with me by following these details. You can download my app Techimus that is available on Google Play. Now coming on to the topic. Here Unary operator overloading is implemented for increment and decrement operation that are plus plus and minus minus operators available in C++. I have included a header file IOS IOS cream then STD namespace is used name of classes number it has an attribute n then inside public section read function is defined which will display enter a number message on console and it will receive a number inside n variable then print function is defined it will display value on console using this C out statement then two overloaded operator functions are defined first one is plus plus so here operator is a keyword plus plus is a symbol which is overloaded here it is Unary operator overloading because arguments are not passed here then attribute n is incremented by one another overloaded function definition is minus minus so again operator keyword is used minus minus is the operator symbol it is also Unary operator overloading here attribute n is decreased by one so these two overloaded operator functions are defined in number class now in main function you can see an object n1 is created then n1 is read through this read function call it will display its value using this print function call now n1 is using plus plus so this plus plus n1 is calling overloaded operator function then print function is called again so this overloaded operator function will increase attribute of n1 by one so incremented value will be displayed using this print function then minus minus n1 statement is available so this statement is also calling overloaded operator function minus minus n1 so n1 is an object and minus minus is the operator which is overloaded here so it will decrease its attribute by one and then decremented value will be displayed on console using print function call so here three outputs will be displayed first before increment second after increment and third after decrement operation so now I am going to execute this code I am entering five you can see the output value equals to five then value equals to six so five has incremented to six then it is again decremented to five so this way I have overloaded plus plus and minus minus operators in C++ I hope you have understood the concept how we can overload it sorry how we can overload plus plus and minus minus unary operators using operator overloading concept that is available in C++ if you want to watch more programming related videos you can subscribe my channel that is sanjay gupta underscore tech school thank you for watching this video