前面白说了啊哈哈,异常就可以用来处理错误
In modern C++, in most scenarios, the preferred way to report and handle both logic errors and runtime errors is to use exceptions. It's especially true when the stack might contain several function calls between the function that detects the error, and the function that has the context to handle the error. Exceptions provide a formal, well-defined way for code that detects errors to pass the information up the call stack.
【 在 wjhtingerx 的大作中提到: 】
: 这是错误啊
:
: :
--
FROM 222.128.162.*