0
Can we add more than 2 or any number of objects via operator overloading?
Any operation for more than 2 objects ,is it possible ? Explain using addition.
1 Réponse
+ 1
You mean like :
Object a,b,c;
cin>>a>>b>>c;
Object m = a+b+c;
???
This is possible, as the + operator adds result of a and b to c, where result(a+b) is an object itself.