Guest User

Untitled

a guest
Jan 24th, 2018
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.31 KB | None | 0 0
  1. //Deletes the entire list by free each element and settign _head to NULL
  2. void deleteList(struct Node** head){
  3.     struct Node* current = *head;
  4.     struct Node* temp;
  5.     while(current!=NULL){
  6.         temp = current;
  7.         current = current->next;
  8.         free(temp->employee);
  9.         free(temp);
  10.         //temp=NULL;
  11.     }
  12.     *head = NULL;
  13. }
Add Comment
Please, Sign In to add comment