Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- IntLinkedList::~IntLinkedList()
- {
- IntNode *temp, *temp1;
- temp = head;
- if(temp->getNext() == NULL)
- delete temp;
- else
- {
- for(temp, temp1 = temp->getNext(); temp1!=NULL; temp1=temp1->getNext(),temp=temp->getNext())
- {
- delete temp;
- }
- delete temp1;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement