Advertisement
pichumy

Untitled

Feb 7th, 2014
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. IntLinkedList::~IntLinkedList()
  2. {
  3. IntNode *temp, *temp1;
  4. temp = head;
  5. if(temp->getNext() == NULL)
  6. delete temp;
  7. else
  8. {
  9. for(temp, temp1 = temp->getNext(); temp1!=NULL; temp1=temp1->getNext(),temp=temp->getNext())
  10. {
  11. delete temp;
  12. }
  13. delete temp1;
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement