作者swpotato (翔楓蕃薯)
看板EE_DSnP
標題[問題] hw1.2.p2b跑不了
時間Tue Oct 11 14:05:24 2011
寫完想測試一下,可是跑完只有顯示
terminate called after throwing an instance of 'std::out_of_range'
what(): basic_string::substr
已經終止
用ddd,把break設在main的sort和for之間,可是好像都沒有跑到break point
只有顯示
terminate called after throwing an instance of 'std::out_of_range'
what(): basic_string::substr
Praogram received signal SIGABRT, Aborted.
0x........(一串記憶體位置) in raise () from /lib/x86_64-linux-gnu/lib.so.6
不知道有什麼問題
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.4.191
※ 編輯: swpotato 來自: 140.112.4.191 (10/11 14:05)
1F:推 ric2k1:可以 up 幾次看看是從哪邊呼叫而 crash 的! 10/11 14:14
2F:推 wmin0:很明顯是call string.substr()爆的 直接在code那行break即可 10/11 15:05
3F:推 vepapuru:gcc和g++的錯誤訊息會不一樣耶XD 10/11 15:13
4F:→ swpotato:感謝 10/11 19:04