#include #include using namespace std; class stack { private: //Let's declare some variables string items[10]; //number of items currently in the stack int numItems; public: stack() { numItems = 0; } void push(string x) { items[numItems] = x; numItems++; } string pop() { string outputItem; outputItem = items[numItems-1]; numItems--; return outputItem; } //Return true if stack is empty, false otherwise bool empty() { } }; int main() { stack S; S.push("ace"); S.push("queen"); S.push("joker"); S.push("king"); S.push("five of clubs"); S.push("jack of hearts"); cout << S.pop() << endl; //jack of hearts cout << S.pop() << endl; //five of clubs S.push("7 of diamonds"); cout << S.pop() << endl; //7 of diamonds cout << S.pop() << endl; //king return 0; }