#ifndef _stack_except_
#define _stack_except_

#include<cstdlib>


template<typename T = int , size_t N = 100> class Stack {
private:	
  T _rep[N];
  size_t _top;
public:
  typedef T value_type;

  Stack():_top(0) {};

  void push(T val) {
    if(_top == N) {
      throw "pushing on top of the full stack";
    }
    _rep[_top++]=val;
  }
  T pop() {
    if(is_empty()) {
      throw "poping form an empty stack\n";
    }
    return _rep[--_top];
  }
  bool is_empty() const     {return (_top==0);} 
};


#endif