#include #include "ListT.h" using namespace std; const int MAX_ITEMS {10000}; void PrintList(ListT list); int main() { ListT a, b; a.Insert(4); a.Insert(3); a.Insert(1); a.Insert(2); a = a; PrintList(a); b = a; PrintList(b); // do a bunch of copies to make sure the current pointer is copied correctly a.Home(); while(not a.IsLast()) { a.Next(); b = a; if (a.Current() != b.Current()) { cout << "Current copy Error" << endl; } } a.Home(); b.Home(); while(not a.IsLast()) { if (a.Current() != b.Current()) { cout << "Copy error, data not the same " << endl; } a.Next(); b.Next(); } return 0; } void PrintList(ListT list){ cout << endl; cout << "************************" << endl; cout << "The list has " << list.Size() << " elements." << endl; list.Home(); while(not list.IsLast()) { cout << list.Current() << " " ; list.Next(); } cout << endl; return; }