#include "stdstuff.h" #include "List.h" List::~List () { Node *t; while (head != NULL) { t = head; head = head -> next; delete t; } } void List::outputList () const { Node *c = head; int i = 0; cout << "The list contains:" << endl; while (c != NULL) { cout << " " << c -> data; if (++i == 10) { cout << endl; i = 0; } c = c -> next; } if (i != 0) cout << endl; } void List::insert (int data) { head = new Node (data, head); }