Advertisement
Guest User

Untitled

a guest
Apr 19th, 2015
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.27 KB | None | 0 0
  1. void Insert(struct flight_info* info)
  2. {
  3.     if(head == NULL)
  4.     {
  5.         head = info;
  6.     }
  7.     else
  8.     {
  9.         struct flight_info* curr = head;
  10.         while(curr->next != NULL)
  11.            curr = curr->next;
  12.  
  13.         curr->next = info;
  14.         info->prev = curr;
  15.         info->next = head;
  16.         head->prev = info;
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement