/*************************************************************************** stack.h - description ------------------- begin : mar mag 6 2008 copyright : (C) 2008 by Gabriele Di Stefano email : gabriele@ing.univaq.it ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef STACK_H #define STACK_H #include #include using namespace std; class Eccezione{ private: string err; public: Eccezione (string s) {err=s;} string getErrore() {return err;} } ; class Stack { private: vector elementi ; public: Stack(); int size() const; void push(int); void pop() throw(Eccezione); int top() const; }; #endif