Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- T removeFront() //removeFront
- {
- if (head == NULL)
- {
- return NULL;
- }
- else if (head->next == NULL)
- {
- T output;
- output = head->data;
- delete head;
- return output;
- }
- else
- {
- T output;
- temp = head;
- output = head->data;
- head = head->next;
- delete temp;
- head -> prev = NULL;
- return output;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment