Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool deleteFourth()
- {
- int count = 1;
- Node *hold;
- if(this->length < 4) return false;
- for(Node *temp=head; temp!=NULL; temp=temp->getNext())
- {
- if(count = 3)
- {
- hold = setNext(temp->getNext()->getNext())
- free(temp->getNext());
- temp = hold;
- return true;
- }
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement