推 simpdanny:_dofile 的type是 ifstream * 所以要_dofile->close(); 11/03 04:25
→ simpdanny:可以去看cmdParser.cpp 的_dofile declaration 11/03 04:25
所以第一行應該寫成ifstream * _dofile = new ifstream(dof.c_str); 嗎?
還是說_dofile = new ifstream(dof.c_str);就已經讓_dofile 的type是ifstream *了?
※ 編輯: meanid 來自: 140.112.245.82 (11/03 04:34)
推 simpdanny:你的理解是正確的. new回傳的是 address 11/03 05:04
推 wmin0:找一下_dofile 這個member data在哪裡被宣告成什麼樣子吧 11/03 06:40
推 victoret:看一下 .h 檔裡 _dofile 的 type 是啥 11/03 08:13