try { int* p = 0; *p = 1; } catch (...) { cout << "null pointer." << endl; }
我试图抓住这样的例外,但它没有用,有什么帮助吗?
c++ exception-handling try-catch
存储例外的地方?堆栈,堆.如何为例外分配和取消分配内存?现在,如果您有多个需要处理的异常,是否创建了所有这些异常的对象?
c++ java exception
c++ ×2
exception ×1
exception-handling ×1
java ×1
try-catch ×1