Hey, I hope that this will be specific enough, but here it goes:
I'd like to overload the + operator in my class called List. It is called in the main like this:
Code:
List c,d;
....data....
d = d + c;
The code I have for the fxn is this:
Code:
List operator+(List& l1, List& l2)
{
List sum;
sum=l1.mylist[]+l2.mylist[];
return sum;
}
This code is outside of the class List. I'm sure that the syntax for the arrays are wrong, that is another question. any help would be much appreciated.... more to come...