作者cdyerty (cdyerty)
看板EE_DSnP
標題[問題] 要的記憶體> blocksize 時
時間Sun May 3 04:54:45 2009
請問一下 :
當 所要的記憶體大於blocksize時
執行 ref code 會有error message :
Requested memory (104) is greater than block size(100). Exception raised...
然後會跳到下一行 繼續執行
但自已寫的檔案 compile 後
執行 ref code 會有error message :
Requested memory (104) is greater than block size(100). Exception raised...
但是之後還會有
terminate called after throwing an instance of 'std::bad_alloc'
what(): St9bad_alloc
Abort
然後就跳出程式了....
請問一下這是什麼情形呀!?
謝謝!!
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.243.14
1F:→ goodword:要加上 try.... catch.... 可參考投影片#03 p144~p153 05/03 07:43
2F:推 shingifred:有看有推! 05/07 23:48