Cpp的异常处理Exception Handling
本文参考这里
Cpp的异常处理建立在三个关键字上:try, catch, throw
try-catch
try {// protected code }catch(...)//三点省略号,handle any type of exception {// code to handle any exception }
throw
略
Cpp标准exception
略
自定义新exception
略
本文参考这里
Cpp的异常处理建立在三个关键字上:try, catch, throw
try {// protected code }catch(...)//三点省略号,handle any type of exception {// code to handle any exception }
略
略
略