// Project StackCopy // File main.cpp #include using namespace std; #include "stack.h" int main() { // Create first stack. Stack s(5); s.push(34); s.push(21); s.push(74); cout << s.peek() << endl; // Create second stack using copy constructor. Stack t = s; s.pop(); s.pop(); cout << s.peek() << " " << t.peek() << endl; t.pop(); cout << t.peek() << endl; return EXIT_SUCCESS; } // Output: // 74 // 34 74 // 21