Category: Operator Overloading
Unary Operator Overloading in C++ using both member & Friend function
In this article we will discuss how to overload unary operators in c++ using both member and Friend function. What is an unary operator? An Unary operator is an operator that operates on a single operand and returns a new value. Advertisements Some of the unary operators are, ++ (Increment Operator) —   (Decrement operator) –    (Unary …
Unary Operator Overloading in C++ using both member & Friend functionRead More
Need of Operator Overloading in C++ ? | Tutorial and Examples
In this article we will discuss what is operator overloading in C++, why do we need it and how to overload an operator for a user defined class. What is Operator overloading ? Operator Overloading means providing multiple definition for the same operator. Advertisements For example, using + operator with two integers will add the …
Need of Operator Overloading in C++ ? | Tutorial and ExamplesRead More
Overloading Postfix / Prefix ( ++ , –) Increment and Decrements Operators in C++
In this article we will discuss how to overload postfix and prefix increment and decrement operators in c++. Both increment and Decrement operators are of two types i.e. Prefix & Post. Advertisements Prefix-Increment (++x) and Prefix Decrement (–x) Operator In case of prefix increment or decrement operators symbol ++ or — comes before the operand …
Overloading Postfix / Prefix ( ++ , –) Increment and Decrements Operators in C++Read More