Monday, August 10, 2009

overloading unary operaters

Let us consider the unary plus operator.A plus operator when used as unary,takes just one opearand.We know that this operator change the sign of an operand when applied to a basic data item.we will see here how to overload this operator so that it can be to be an object in much the same way as is applied to an int or float variable>The unary plus when applied to an object should change the sign of each of its data item.

No comments:

Post a Comment