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