In Operator Overloading just suppose i am talking about operator(+),
if i have a class Bluejem and i want to add three object (Cascaded Operation)
i am confused in knowing that which two objects will add first
blue_2+blue_3
or
blue_1+blue_2
help me!
on saturday i have to submit my lab work on operator overloading.... .
if i have a class Bluejem and i want to add three object (Cascaded Operation)
Code:
class Bluejem
{
........
//member function
Bluejem operator+(Bluejem& obj );
.......
};
void main()
{
blue_return=blue_1+blue_2+blue_3;
.........
.........
}
blue_2+blue_3
or
blue_1+blue_2
help me!
on saturday i have to submit my lab work on operator overloading.... .
Comment