Image

Imagechianeko wrote in Imagecpp

help with linked lists

what would happen if you returned *this when using linked lists? Because I'm not too sure if I can do that, or not.

Here's an example of an overloaded operator which adds whatever terms are in aNode to the current linked list:

Node Node::operator+=(const Node* aNode) {


*this = *this + aNode;

return *this;
}