Why won't my code delete the last element of the linked list? I create a current pointer to transverse through my list and break out of the loop..(next is the point that is within my struct called Card_Node). It should be simple to answer, just not sure why it won't delete the last node in the list"
Card_Node *current;
current = front;
while ( current->next->next != NULL){
{
current = current-> next;
}
Card a = current->next->card;
return a;
delete current->next;
current->next = NULL;
}
std::list? - Remy Lebeau