Jump to content

[C] problem with remove record from linkedlist

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1
mith

mith

    Newbie

  • Members
  • PipPip
  • 18 posts
Hi, i have problem with making function which remove choosen by user record from list
its my declared structure:

struct record {

  char tytul[30];

  char autor[30];/* with this argument i want to choose removeing*/

  char nr_kat[30];

  struct record *next;    

  };

  

struct record *start;         

struct record *last;         

struct record *find(char *); /*pointer for searching function by 'nr_kat'*/

i desperately need this code :/ any good soul to help me?:p

#2
Orjan

Orjan

    Writes binary right handed and hex left handed

  • Moderators
  • 3,298 posts
it's much easier in a double linked list, i.e. a list with links to both the item after and before the current item. a little bit more job to set it up, but once there, it makes your life easier with this.
__________________________________________
I study Information Systems at Karlstad University when I'm not on CodeCall

#3
dcs

dcs

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 775 posts
Eternally Confuzzled - Linked List Tutorial