Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void pop(Stack *s)
- {
- Node* iterator;
- if(s->head == NULL)
- {
- printf("ERROR STACK");
- return;
- }
- iterator = s->head;
- while (iterator->next != s->tail)
- {
- iterator = iterator->next;
- }
- iterator->next = NULL;
- s->tail = iterator;
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment