#ifndef EXCEPTH #define EXCEPTH #include <sstream> //for ostringstream #include <exception> //for exception #include <string> using namespace std; class except: public exception { const string s; public: ~except() throw () {} except(const string& initial_s) throw () : s(initial_s) {} except(const ostringstream& ost) throw () : s(ost.str()) {} const char *what() const throw () {return s.c_str();} }; #endif