try { int* p = 0; *p = 1; } catch (...) { cout << "null pointer." << endl; }
我试图抓住这样的例外,但它没有用,有什么帮助吗?
c++ exception-handling try-catch
c++ ×1
exception-handling ×1
try-catch ×1