I have this declaration of my list:
with this input:Code:typedef struct NODE{ char *name; struct NODE *next; struct NODE *prev; } Person;
Joe
Sarah
Bob
Jill
Sarah
Bob
If the name is not in the list yet, I need to add it to the end.. which is
and so on. I got that part.. But I dont know how to stop on a certain node if the name is already in the list, or how do I go about scanning it. Should I use another function? What code ...Code:sentinel->prev->next = new_node;
If the name is not in the list, I just use that node for the rest of the program..



LinkBack URL
About LinkBacks



