Brandan

Untitled

Oct 9th, 2014
322
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. list::~list() {
  2.     if (size != 0) {
  3.         node * curr = headByName;
  4.         while (headByName) {
  5.             curr = headByName->nextByName;
  6.             delete headByName; //the destructor for individual data (item) is invoked
  7.             headByName = curr;
  8.         }
  9.     }
  10. }
RAW Paste Data