Removing a Node from a Doubly Linked List in C
问题 As a whole my program is for inserting and deleting nodes in a sorted doubly linked list. Insertion works and deleting the first node from the linked list works fine, except deleting the last node. Also, deleting nodes in the middle and end don't work. If I try to delete the last node, I am led back to main(); If I try deleting a node in the middle, the program crashes. Your help is appreciated! void remove(int n){ struct node* help = head; if(head->data == n){ if (head->next) help->next-