Q: Remove multiple nodes of the same value with one function execute void List::delete_dupes() {
for (IntNode* i = head; i != 0; i = i->next) {
    for (IntNode* curr = i; curr != 0; curr = curr->next) {
        if ((curr->next != 0) && (curr != 0)) {
            if (curr->next->data == i->data) {
                IntNode* new = curr->next->next;
                delete curr->next;
                curr->next = new;
            }
            if (curr->next == 0) {
                tail = curr;
            }
        }
    }
}
}

I am creating a function inside a class called "List" that, given a linked list of nodes, is supposed to delete every node that contains the same value as the node located by i, hence removing duplicate nodes.
I can run the function just fine, as it does remove the duplicate nodes, but the small problem I am running into is that I want the function to remove all the duplicate nodes in one function call, but it would only remove the first duplicate.
