看板 EE_DSnP 關於我們 聯絡資訊
在還沒修改過 openDofile 和 closeDofile 之前 直接去 make 之後 輸入 do ./dofiles/do1 會顯示出如下的狀況 mcalc> do ./dofiles/do1 mcalc> help DOfile: execute the commands in the dofile HELp: print this help message HIStory: print command history MADD: perform modular number addition MCOMPare: compare if two variables or values are equal MMULTiply: perform modular number multiplication MPrint: print the variables of the modular number calculator MSET: set the modulus of the modular number calculator MSUBtract: perform modular number subtraction MVARiable: set the variable value of the modular number calculator Quit: quit the execution mcalc> 程式記憶體區段錯誤 想請問一下,這個 " 程式記憶體區段錯誤 " 是來自於哪裡??? -- 理所當然的某項事物,卻會以某天為區隔,從此變得不再理所當然。 恩田陸 夜間遠足 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.25.108
ric2k1:你這個情況還算是單純的,用ddd/gdb trace一下就知道原因啦 10/27 21:05
djshen:close的時候_dofile沒有=0? 10/27 22:28
victoret:感謝教授和樓上的回答... 10/27 23:51
victoret:結果因為 TODO 寫在 delete 的上面...就傻傻的以為只能在 10/27 23:52
victoret:delete 之前修改了...囧ˊˋ 10/27 23:52
victoret:不過隨便加一些東西到 openDofile 或是 closeDofile 都很 10/27 23:58
victoret:容易造成整個 ubuntu 當在那裡不能動... 10/27 23:59
victoret:用 ddd 比較保險一點@@ 10/27 23:59
vuluy:我就當掉好幾次XD 10/28 00:52
victoret:用 ddd + xkill 可以省下不少麻煩 10/28 01:05