#include "list.h" #include "listNode.h" #include using namespace std; int main() { cout << endl; List l; l.Readin(); cout << "List l" << " Located at " << &l << endl; l.Printout(); cout << endl; List m; m.Readin(); cout << "List m" << " Located at " << &m<< endl; m.Printout(); cout << endl; List o = m; // Works just fine cout << "List o" << " Located at " << &o<< endl; o.Printout(); cout << endl; List p(m); // Works just fine cout << "List p" << " Located at " << &p<< endl; p.Printout(); cout << endl; List q; // Works just fine q = m; cout << "List q" << " Located at " << &q<< endl; q.Printout(); cout << endl; l.Erase(); m.Erase(); // One should not use the o list after this point cout << "List l" << " Located at " << &l<< endl; l.Printout(); cout << "List m" << " Located at " << &m<< endl; m.Printout(); cout << "List q" << " Located at " << &q<< endl; q.Printout(); cout << endl; return 0; }