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