Removing an item from a linked list
So I'm building this linked list, with all the adding, and deleting of Nodes done in the Node class themself (managed by a List class). Now I've got the methods working to add and remove elements to the list (in this case a name that's an array of characters), but I can't quite figure out what to write for a loop to check if the string the user types is actually in the list. While the loop I have in the beginning of the method now allows me to type in any name that's not in the list without giving me errors, it now only allows the first non-dummy Node to be deleted. I'm kind of stumped, any suggestions?
void Node::remove(char n)
if(strcmp(link->name,n)!=0) // checks to see if character asked to remove exists in the list
Node *temp = new Node(n,link);
link = link->link;
temp->link = NULL;
temp == NULL;