#include #include #include "linkedList.h" using namespace std; void weird() { linkedList X; for (int i = 0; i < 10; i++) X.addFront(i); } int main() { linkedList L; //Add items to front of list L.addFront(20); L.addFront(50); L.addFront(11); L.addFront(4); L.addFront(71); L.addFront(32); L.addFront(42); L.sort(); weird(); //Print list L.printList(); weird(); //Quiz: implement pop(): remove and return //front item from list. cout << "popping: " << L.pop() << endl; cout << "popping: " << L.pop() << endl; while (!L.empty()) cout << "popping: " << L.pop() << endl; L.printList(); //Deconstructor demo: will crash without proper deconstructor while (true) weird(); return 0; }