What happens when you attempt to compile and run the following code?
#include
#include
using namespace std;
class myClass : public exception
{
virtual const char* what() const throw()
{
return "My exception.";
}
} obj;
int main () {
try
{
throw obj;
}
catch (exception& e)
{
cout << e.what() << endl;
}
return 0;
}
Robt
3 days agoAmber
10 days agoRima
12 days agoCordelia
16 days ago