作者tiffiej (小小)
看板EE_DSnP
標題[問題] 程式記憶體區段錯誤
時間Sun Apr 12 22:34:33 2009
我make完:
然後 ./modCalc
不管輸入什麼都會出現:
"程式記憶體區段錯誤"
或是
"terminate called after throwing an instance of 'std::out_of_range'
what(): basic_string::substr
已經終止"
我make test完 testMC可以跑,只是不完全正確
可是modCalc就完全跑不動
不知道possible explanation是什麼?
謝謝~
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.225.73
※ 編輯: tiffiej 來自: 140.112.225.73 (04/12 22:59)
推 ric2k1:用 debugger 到 cmdParser.cpp 裡面看看... 04/12 23:06
→ tiffiej:我連ddd都打不開@@ 它說有bug然後"程式記憶體區段錯誤" 04/12 23:16
→ tiffiej:喔喔~沒事了 ddd打開了 =P 04/12 23:20
推 ric2k1:ddd 會 "程式記憶體區段錯誤" 通常是 x-manager 沒開... 04/12 23:29
→ ric2k1:不過遠端的話其實 gdb 用起來比較快... 04/12 23:30