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
2 months agoAnnamae
29 days agoSoledad
1 months agoIsadora
2 months agoLenny
2 months agoAngella
2 months agoSharmaine
13 days agoMyra
17 days agoFletcher
1 months agoMerrilee
1 months agoAlease
2 months agoRobt
3 months agoMelvin
2 months agoColby
2 months agoAmber
3 months agoRima
3 months agoCordelia
3 months ago