I have found lots of examples online for how to overload other operators like +, - and ==, but nothing for =. First, I tried
CharArrayList operator=(const CharArrayList &list);
The compiler complained, saying I had one parameter instead of two.
Next, I tried
CharArrayList operator=(const CharArrayList &before, CharArrayList &after);
The compiler complained again, saying I had three parameters instead of two.
How can I make my overloaded = operator contain exactly two parameters?