作者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