#include #include "ListT.h" #include using namespace std; const int NUM_LIMIT = 10; int main() { srand(time(nullptr)); size_t i; int num; ListT a,b; int zeroCount =0; for(i = 0; i < 100000; i++) { num = rand() % NUM_LIMIT; cout << "Iteration " << i << endl; cout <<"\tThe number is " << num << endl; if (a.Find(num)) { cout << "\tRemoving " << num << endl; a.Delete(num); } else { cout << "\tInserting " << num << endl; a.Insert(num); } cout << "\tThe List "; a.PrintList(); if (a.Size() == 0) { zeroCount ++; } cout << endl; cout << "\tThe List (after =) "; b = a; b.PrintList(); cout << endl; ListT c(a); cout << "\tThe List (after copy constructor) "; c.PrintList(); cout << endl; cout << endl; } cout << "The zero count is " << zeroCount << endl; return 0; }