异常接口声明

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_23859701/article/details/81452849
//这个函数可以抛出 int  float char 三种类型异常,抛出其它就报错
void func() throw(int,float,char)
{
throw "abc"
}
catch(...)捕获所有异常

猜你喜欢

转载自blog.csdn.net/qq_23859701/article/details/81452849