I just started learning linked list and nodes and I'm stil getting use to the syntax.
http://i1330.photobucket.com/albums/...ps61afd59b.jpg
I made this to help me visualize my list.
do I set the code to skip to get to the next node
like this
Code:p=p->next=p->next
And I'm guessing that the node I have to delete has to be deallocated because it still exist somewhere in memory.
So does that mean I will have to traverse through the list first and make p point to the one I want to delete and make another pointer let's say node * d and then have d point to where p is pointing.
Then traverse again and when p gets to the node before the one I want to delete and have p->next point to the node after the one I want to delete and then delete d.
Code:delete d;