//File:	intStackDriver.cpp
#include <iostream>
#include "intStack.h"
using namespace std;
int main()
{
	intStack s;
	
	try
	{
		s.push(25);
		s.push(12);
		s.push(8);
		s.push(10);
	}
	catch (pushOnFull)
	{
		cerr << "Pushing onto full stack..." << endl;
	}
	
	try
	{
		cout << s.pop() << endl;
	}
	catch (popOnEmpty)
	{
		cerr << "Popping an empty stack..." << endl;
	}
	
	try
	{
		s.push(34);
		s.push(45);
	}
	catch (pushOnFull)
	{
		cerr << "Pushing onto full stack..." << endl;
	}
	
	try
	{
		cout << s.pop() << endl;
		cout << s.pop() << endl;
		cout << s.pop() << endl;
		cout << s.pop() << endl;
	}
	catch (popOnEmpty)
	{
		cerr << "Popping an empty stack..." << endl;
	}
	
	return 0;
}
