Recording_linux c++下 try catch用法

来源:互联网 发布:ubuntu给予文件夹权限 编辑:程序博客网 时间:2024/06/16 03:28
#include<exception>
#include"iostream"
using namespace std;
int main()
{
try{

        if(1)throw"get 1";

}

catch(const char*msg)

{

cout<<msg;

}

return 0;
}
原创粉丝点击