#include // allows use of cin and cout #include "stack.h"; using namespace std; int main() { Node nn("hello"); Node nnn(nn); cout << nnn.getValue() << endl; Stack myStack; myStack.push(3); cout << myStack.top() << endl; myStack.push(12); myStack.printString(); cout << "finish printing" << endl; cout << myStack.top() << endl; Stack yourStack; yourStack = myStack; cout << "Printing yourStack" << endl; yourStack.printString(); cout << "ready to pop" << endl; while (!myStack.isEmpty()){ cout << myStack.top() << endl; myStack.pop(); } cout << "popped" << endl; myStack.push(12); myStack.clear(); if (myStack.isEmpty()){ cout <<"cleared" << endl; } else { cout << "not cleared" << endl; } cout << "starting yourStack: " << endl; for (Stack::Iterator it = yourStack.begin(); it != yourStack.end(); ++it) { cout << "*it = " << *it << endl; } while (!yourStack.isEmpty()) { cout << yourStack.top() << endl; yourStack.pop(); } return 0; }