作者Gwaewluin (神無月 孝臣)
看板Fortran
標題Re: [問題] binary檔寫檔錯誤
時間Wed Mar 11 09:13:38 2009
問題解決了
bug不在寫檔的地方上
後來我改成用sequential檔去存一樣會出現寫不進去的錯誤
最後使用蠻幹方式做了許多測試後終於找到bug了
是改寫程式時,一個動態矩陣配置的地方忘記修改宣告大小
而那個矩陣會在寫檔的迴圈裡面默默記錄東西
修正後就一切正常了
可是搞不懂為啥一開始不說是矩陣維度錯誤而要說寫檔有問題
早點知道的話一下就可以修好了ˍ| ̄|●
--
Deserves death! I daresay he does. Many that live deserve death. And some die
that deserve life. Can you give that to them? Then be not too eager to deal out
death in the name of justice, fearing for your own safty. Even the wise cannot
see all ends.
Gandalf to Frodo
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.120.25.235
1F:→ blc:它是說資料長度不一致呀… 03/11 10:10
2F:→ Gwaewluin:但是我那個矩陣沒有用到寫檔,只有在存別的資料而已 03/11 11:32
3F:→ blc:memory overflow? 03/11 20:35
4F:→ Semisphere:這種問題很容易出現,陣列維度搞錯在使用上或是傳進 03/11 22:35
5F:→ Semisphere:副程式中維度錯誤,多半會顯示在其他地方有錯 03/11 22:36