Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- list::~list() {
- if (size != 0) {
- node * curr = headByName;
- while (headByName) {
- curr = headByName->nextByName;
- delete headByName; //the destructor for individual data (item) is invoked
- headByName = curr;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement