}
catch (access_violation const &)
{
cout << "caught access violation" << endl;
}
catch (divide_by_zero const &)
{
cout << "caught divide by zero" << endl;
}
catch (structured_exception const &)
{
cout << "caught unspecified structured exception" << endl;
}
return 0;
}
再次运行,结果是:
caught access violation
caught divide by zero