I am only leaving this question out for a couple of hours...
I need to delete a node in a linked list (the node has more than one piece of data). My current function seems to be removing this node, but damages the list, so that further deletes are not working.
bool llistBooks::deleteB(string &target)
bookNoce Ptr before = head;
bookNodePtr temp = before->next;
for (before; before != NULL; before = before->next)
for (temp; temp != NULL; temp = temp->next)
if (temp->isbn == target)
cout << temp->isbn << "temp" << endl;
cout << before->isbn << "before" << endl;
temp = before;
before = temp->next;
before->next = temp->next;
cout << "BOOK DELETED" << endl;
before = before->next;