Marco wrote: > The following code compiles with Microsoft Visual Studio but not with > GNU (version 3.3.3 running on Linux). Is there a way to inhert from > exception in GNU?
How about you tell us the exact errormessage? It might also be worth reporting the version of the comparison environment. > #include <iostream> > #include <exception> > > class Toto : public exception 1st mistake (as already pointed out) it's std::exception. > { > public: > virtual const char* what() { return "tutu";} This function signature is simply wrong. > private: > > }; When that's all that is there, you could as well make that a struct because access to baseclasses and members defaults to public there. Less code to read and write. Uli -- http://gcc.gnu.org/faq.html http://parashift.com/c++-faq-lite/ _______________________________________________ help-gplusplus mailing list help-gplusplus@gnu.org http://lists.gnu.org/mailman/listinfo/help-gplusplus