#include #include #include "stack.h" using namespace std; int main() { stack S; S.push("time card"); S.push("queen of hearts"); S.push("ace of spades"); S.push("ace of arrows"); S.push("joker"); cout << S.pop() << endl; //joker cout << S.pop() << endl; //ace arrows S.push("king of diamonds"); S.push("birthday card"); cout << S.pop() << endl; //birthday card cout << S.pop() << endl; //king of diamonds cout << S.pop() << endl; //ace of spades while (!S.empty()) { cout << S.pop() << endl; } return 0; }