|
Re: Linked List problem - Deleting a node
The textbook response to linked list problems is to draw it out on paper, then walk through your code on said paper and see what happens. Your problem is fairly easy if you're looking at a picture. Hint: you're breaking the chain instead of removing a link.
Side note about style: using a global variable for current_ptr is a poor practice. Your code would be better if you declared a local variable in each function where you iterate over the list.
__________________
<insert disclaimer here>
<insert shameless plug for Visual Studio here>
|