c++中如何捕获异常我这个程序运行的时候会突然出现runtime error的错误,我想包含一个stdexcept这个文件,不
c++中如何捕获异常
我这个程序运行的时候会突然出现runtime error的错误,我想包含一个stdexcept这个文件,不知道异常处理怎么写,望高手们写一个实例给我看看 非常感谢!!!
[解决办法]
try
catch
[解决办法]
try{
throw -1;
}
catch(int e)
{
printf("exception:%d",e);
}
c++中如何捕获异常
我这个程序运行的时候会突然出现runtime error的错误,我想包含一个stdexcept这个文件,不知道异常处理怎么写,望高手们写一个实例给我看看 非常感谢!!!
[解决办法]
try
catch
[解决办法]
try{
throw -1;
}
catch(int e)
{
printf("exception:%d",e);
}