ok, a while back i asked about an inventory system and got the answer: linked lists. woohoo, theyre working wonderfully. but... i can't figure out how to remove members of the list without screwing the whole thing up. i know the simple answer would be a doubly linked list. then i could just do this:
previous->next = current->next;
current->next->previous = current->previous;
and free up the memory using free()
but i dont know how to do the "previous" pointer. can anyone either point me to a tutorial or tell me here? i know linked lists fairly well, so i wouldnt need much of the explanation i think. but if im mistaken, then just tell me where i could find a tutorial (im trying google as we speak without much result).
as usual, thank you all very much. your tolerance of newbies is greatly appreciated žÅNžÅ
previous->next = current->next;
current->next->previous = current->previous;
and free up the memory using free()
but i dont know how to do the "previous" pointer. can anyone either point me to a tutorial or tell me here? i know linked lists fairly well, so i wouldnt need much of the explanation i think. but if im mistaken, then just tell me where i could find a tutorial (im trying google as we speak without much result).
as usual, thank you all very much. your tolerance of newbies is greatly appreciated žÅNžÅ