Example #1
0
int main()
{
   CStack s;

   s.print();

   s.push(5);
   s.push(10);
   s.push(8);

   s.print();

   cout << "peek at top of stack = " << s.peek() << endl;
   s.print();
   cout << "pop top of stack = " << s.pop() << endl;
   cout << "pop top of stack = " << s.pop() << endl;
   s.print();
   cout << "pop top of stack = " << s.pop() << endl;
   cout << "pop top of stack = " << s.pop() << endl;

   return 0;
}