#ifndef BAD_THING_H #define BAD_THING_H class payloader{ public: int refcount; char str[0]; }; class bad_thing: public std::exception{ std::string msg; public: virtual const char* what() const throw() { return msg.c_str(); } // constructor bad_thing(const std::string _msg) : msg(_msg) {} // destructor ~bad_thing() throw() { } }; #endif