// Linked list with integer values #include "IntList.h" // Testing interface - get values from command line, display, delete last 2 int main(int argc, char *argv[]) { if (argc < 3) { cerr << "Usage: " << argv[0] << " n1 n2 ... nk d1 d2" << endl; return -1; } IntList ilist; for (int i = 1; i < argc - 2; ++i) { ilist.append(atoi(argv[i])); } ilist.display(); int d1 = atoi(argv[argc - 2]); ilist.remove(d1); cout << "After deleting the value(s) " << d1 << ", the list is" << endl; ilist.display(); ilist.insert(99, 0); cout << "Inserted 99 at position 0" << endl; ilist.insert(999, 4); cout << "Inserted 999 at position 4" << endl; ilist.insert(9999, 13); cout << "Inserted 9999 at position 13" << endl; ilist.display(); int d2 = atoi(argv[argc - 1]); ilist.remove(d2); cout << "After deleting the value(s) " << d2 << ", the list is" << endl; ilist.display(); }