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