i have a problem with linked lists. in the function del_node dont do what is supose to do, the functions is to remove the node. Someone can help me?
Code:
www private pastebin - collaborative debugging tool
crazycaw
1 reply to this topic
#1
Posted 10 July 2010 - 03:15 PM
|
|
|
#2
Posted 10 July 2010 - 07:54 PM
Don't you need a element to delete, I would assume you search for a element and delete the element, but of course the previous node would have to point to the node after the one you want to delete : ) .
Example
A B C D E F
if you wanted to delete C
B would need to point to D,
then you free C
Example
A B C D E F
if you wanted to delete C
B would need to point to D,
then you free C
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account

Back to top









