// kwilliam.h: A header file defining the function template
// for the stack class


#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <iomanip>
using namespace std;

template <class T>

class Stack { 
public:
   Stack() {T *p; p = new T[10]; };       // Default constructor
   Stack(const Stack &array);            // Copy constructor
   ~Stack(); // Destructor

   bool isEmpty() {
   if (p.empty()) 
    return false;
   else
    return true; 
   }

   void push(T const a) {
       int i;
       if(length() == 10) {
        cout << "INCREASING STACK SIZE NOW: " << endl;
       }  
       i = length() + 1;
       p[i] = a;
   }

   void pop() {
    for(i=p.begin(); i!=p.end(); ++i) {
     p[i] = p[i+1];
    }
   }

  T top() {
   return &p[0];
  }


private:
   T *p;
};
