daily pastebin goal
54%
SHARE
TWEET

Untitled

Croissant_99 Dec 16th, 2018 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. struct library deleteBook(struct library head, char choiceBook[50]){
  2.     struct library *next,*start,*end,*temp,*bfrEnd,*t;
  3.     start = head;
  4.     next = head -> next;
  5.     temp = head;
  6.     end = head;
  7.     bfrEnd = head;
  8.     for (temp = head; temp -> next != NULL; temp = temp->next){
  9.         for(start = head; start -> next != NULL; start = start ->next){
  10.             for(bfrEnd = head; bfrEnd -> next != end; bfrEnd = next -> next ){
  11.                 for (end = head; end -> next != NULL; end = end->next){
  12.                 }
  13.                
  14.             }
  15.             //start
  16.             if(strcmp(start -> collection.title, choiceBook) == 0){
  17.                 copybook(&(start->collection), &(end -> collection));
  18.                 next = head;
  19.                 bfrEnd -> next = NULL;
  20.                 free(end);
  21.            
  22.             }
  23.             //end
  24.             if(strcmp(end -> collection.title, choiceBook) == 0){
  25.                 printf("%s\n",bfrEnd->collection.title);
  26.                 printf("%s\n",bfrEnd->collection.author);
  27.                 printf("%s\n",bfrEnd->collection.subject);
  28.                 printf("%s\n",bfrEnd-> next -> collection.subject);
  29.                 bfrEnd -> next = NULL;
  30.                 free(end);
  31.            
  32.             }
  33.             //between
  34.             if(strcmp(temp -> collection.title, choiceBook) == 0){
  35.                 copybook(&(temp->collection), &(end -> collection));
  36.                 bfrEnd -> next = NULL;
  37.                 free(end);
  38.             }
  39.            
  40.         }
  41.     }
  42. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top