Ulrich Eckhardt wrote:
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.
To be more precise:
1. The virtual is redundant.
2. The footprint should be:
const char *what() const throw();
private:
};
_______________________________________________
help-gplusplus mailing list
help-gplusplus@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gplusplus