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;
}
Mariann
1 months agoAnnamae
1 days agoSoledad
13 days agoIsadora
23 days agoLenny
1 months agoAngella
1 months agoFletcher
9 days agoMerrilee
16 days agoAlease
1 months agoRobt
2 months agoMelvin
21 days agoColby
1 months agoAmber
2 months agoRima
2 months agoCordelia
2 months ago