Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MultiLinkedList *removeItem(MultiLinkedList *list, char *first, char *last)
- {
- // remove the individual specified from the list
- Node *c=malloc(sizeof(Node));
- c->nextFirst=list->headFirstName;
- c->nextLast=list->headLastName;
- while(c->nextFirst!=NULL || c->nextLast!=NULL)
- {
- if(c->nextFirst!=NULL)
- {
- c=c->nextFirst;
- }
- else if(c->nextLast!=NULL)
- {
- c=c->nextLast;
- }
- if((strcasecmp(c->first, first)==0) && (strcasecmp(c->last, last)==0))
- {
- c->nextLast=c->nextLast->nextLast;
- c->nextFirst=c->nextFirst->nextFirst;
- }
- }
- return list;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement