- Jul 18, 2002
- 2,149
- 1
- 76
Ok I have written a program for class in C++ to add two linked lists overloading the + & += operatorss.
But the method that was explained to me was such that when I add two lists
for example
List1 and List2, results in List1+=List2 & List3=List1+List2
What happens in these cases is that the original lists get destroyed(as in the original lists are empty).
It is not a requirement for the assignment that the lists not be destroyed, I was just curious so I did a little search on the net and I did not find anything relevant. I was just wondering if anyone on here knew anything how to do it.
Thanks in advance.
Ravana.
But the method that was explained to me was such that when I add two lists
for example
List1 and List2, results in List1+=List2 & List3=List1+List2
What happens in these cases is that the original lists get destroyed(as in the original lists are empty).
It is not a requirement for the assignment that the lists not be destroyed, I was just curious so I did a little search on the net and I did not find anything relevant. I was just wondering if anyone on here knew anything how to do it.
Thanks in advance.
Ravana.
