terminate called after throwing an instance of ‘std::bad_alloc’
what(): St9bad_alloc
已放棄
在我運行程序沒有問題後結果居然是這樣的一段話,那麼應該怎麼解決這個問題呢?
這個問題主要是你在使用new的上面出了問題,注意當你要new數組時new int[ ]裏面的內容不能是負數!否則會出現這種錯誤。
terminate called after throwing an instance of ‘std::bad_alloc’
what(): St9bad_alloc
已放棄
在我運行程序沒有問題後結果居然是這樣的一段話,那麼應該怎麼解決這個問題呢?
這個問題主要是你在使用new的上面出了問題,注意當你要new數組時new int[ ]裏面的內容不能是負數!否則會出現這種錯誤。