catch(~) ~の中ではexceptionが参照として登録されたんですよね。
ちょっと気になったんですが、なんで参照を使っているんでしょうか?
コード #include <iostream> #include <exception> using namespace std; int main () { try { int* myarray= new int[1000]; } catch (exception& e) { cout << "Standard exception: " << e.what() << endl; } return 0;
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2015/12/09 01:33