Jump to content

Linked List in C

- - - - -

  • Please log in to reply
1 reply to this topic

#1
crazycaw

crazycaw

    Newbie

  • Members
  • Pip
  • 4 posts
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

#2
HiRo

HiRo

    Newbie

  • Members
  • PipPip
  • 17 posts
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




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users