// Stack demo 2
// By DreamVB 21:19 17/10/2016

#include <iostream>
#include <stack>

using namespace std;
using std::cout;
using std::endl;

int main(int argc, char *argv[]){
	stack<char>Chars;
	int i = 0;

	//Push some chars onto the stack.
	cout << "Push ";

	while (i < 10){
		Chars.push((char)(65 + i));
		cout << (char)('A' + i) << " ";
		i++;
	}
	//Pop the items off the stack.
	cout << endl;

	cout << "Pop  ";
	while (!Chars.empty()){
		//Get the top item
		cout << Chars.top() << " ";
		//Pop off the next item
		Chars.pop();
	}

	cout << endl;
	system("pause");
	return 0;
}