Hi, I'm trying to catch dividing by zero attempt:
int _tmain(int argc, _TCHAR* argv[])
{
int a = 5;
try
{
int b = a / 0;
}
catch(const exception& e)
{
cerr << e.what();
}
catch(...)
{
cerr << "Unknown error.";
}
cin.get();
return 0;
}
and basically it doesn't work. Any advice why? Thank you. P.S. Any chance that in the future code can be placed between [code][/code] tags instead of four spaces?