Wednesday, 18 April 2012

Provide some examples of operator overloading. | C++

The implementation of operator overloading is done in the following ways:
1. Concatenating two std:-.string objects by using the + operator
2. Incrementing a Date object by using the ++ operator
3. Multiplying two different number objects by using the * operator
4. Accessing array elements from an object of the Array class by using the subscript operator

No comments: