How do I remove a node by the element so that the linked lists still work?
This is what I have so far but its not working
This is what I have so far but its not working
void DLinkedList::removeName(const Elem& name) {
int check = 0;
DNode*temp = header;
while(temp!=trailer)
{
if(temp->elem == name){
delete elem;
break;
}
temp = temp -> next;
}
}