Example #1
0
int main()
{
	CStack stack; // Default constructor is called.  Our stack will be 
				 // kDefaultStackSize (10) elements large.

	// Let's push some integers (0, 1, 2, 3, 4) on the stack
	for(int i = 0; i < 5; i++)
		stack.push(i);

	// Now lets pop all the elements off of the stack printing each one 
	// as they come off
	while(stack.isEmpty() == false)
	{
		cout << "Top = " << stack.getTop() << endl;
		stack.pop();
	}
	
	return EXIT_SUCCESS;

} // end of main()