//include the header file for the stack
#include "stack_list.h"
void main()
{
// declare a pointer to a new class stack object.
// new allocates memory dynamically for the stack.
stack *s = new stack();
// push two elements 10 and 20, onto the stack
s->Push(10);
s->Push(20);
// output the top element of the stack.
// note that Top() returns an int which can be outputted
using cout
cout<<endl<<s->Top();
// remove the top element from the stack
s->Pop();
// output the top element of the stack
cout<<endl<<s->Top()<<endl;
// remove all elements from the stack
s->MakeEmpty();
// the call to Top will indicate that the stack is
empty
s->Top();
}