int main()
{
int x;
//declare a pointer to a stack
stack *s = new
stack;
// Push 10 elements on to the stack. Note the use of -> with pointers
s->Push(5);
s->Push(20);
s->Push(30);
s->Push(100);
s->Push(1);
s->Push(35);
s->Push(80);
s->Push(90);
s->Push(11);
s->Push(-5);
// Pop 2 elements
from the stack
s->Pop();
s->Pop();
// Output the top
element on the stack
x = s->Top();
cout<<"Top
element is: "<<x;
//Empty the stack
s->MakeEmpty();
// Push the element
10 on to the stack
s->Push(10);
// Output the top
element of the stack
cout<<endl<<"Top
element is: "<<s->Top();
}