/* testgll.cpp CIS 250 David Klick 2016-03-22 Test driver for templated linked list class (gll.h). */ #include "gll.h" #include "MyObj.h" #include #include using std::cin; using std::cout; void cont(); int main(int argc, char* argv[]) { int i; gll lst; MyObj arr[5]; for (i=0; i<5; i++) { arr[i].setNum((i+1)<<1); lst.add(arr[i]); } // display list cout << lst << "\nLength: " << lst.length() << "\n\n"; // remove second item and redisplay lst.remove(arr[1]); cout << lst << "\nLength: " << lst.length() << "\n\n"; return 0; } /* Sample run: 2 4 6 8 10 Length: 5 2 6 8 10 Length: 4 */