D
2006-10-25 15:42:40 UTC
I am not looking for a textbook def, or a google define, or anything of the sort. My main questions are what I'm having a hard time understanding.
1)My text book says that operator overloading does not allow the programmer to create NEW operators, but extend the def of pre-exisitng ones. I dont see how this is very useful being as the examples in the book (where the overloading functions are defined {take + as an example} are comparing data members such as the example below})
int operator+(const class1& obj1, const class1& obj2)
{
class1 objtemp;
objtemp = obj1.length + obj2.length;
return value;
}
The rest will posted in an addiontal detail, I am out of space.