精華區beta EE_DSnP 關於我們 聯絡資訊
有同學在問為什麼 eof() 不 work? 請注意它的定義 --- bool eof() cosnt 1 or true if the end of the stream has been reached, 0 or false otherwise. 也就是說你必須先遇到一次檔案讀取失敗 (讀到檔尾) 然後呼叫 eof() 才會回你 false -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 59.121.130.225
lunworld:是錯誤才回true吧? 11/05 22:48
ric2k1:我寫反了 11/05 23:42