Public feed #721434

Someone

public cpp v1 · immutable
Raw Edit
·published 2007-10-01 07:30 UTC
rendered paste body
#include <iostream>#include <string>using namespace std;class test : public exception {	public:	test(const string &msg) : msg(msg) {			}	virtual const char* what() const throw() {		return msg.c_str();	}	~test() throw() {};	private:	string msg;};int main(int argc, char** argv) {	try {		throw test("LOL");	}	catch(test &e) {		cout << e.what() << endl;	}	return 0;}