[問題] 讀 TXT 檔的問題
開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
Dev C++ 4.9.9.2
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
#include <fstream>
問題(Question):
讀進來的資料與輸出的資料不符合
餵入的資料(Input):
banker.txt
http://ppt.cc/AENf
預期的正確結果(Expected Output):
#AVAILABLE 0
.
.
.
#ALLOCATION 41
#pid, 42
.
.
.
錯誤結果(Wrong Output):
#AVAILABLE# 0
.
.
.
#ALLOCATIO#pid, 41
#pid, 42
程式碼(Code):(請善用置底文網頁, 記得排版)
http://pastie.org/2054974
補充說明(Supplement):
預期的正確結果是在讀取的時候也順便輸出
所以不曉得會甚麼會產生錯誤 @Q@
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.37.32.104
→
06/12 13:25, , 1F
06/12 13:25, 1F
→
06/12 13:37, , 2F
06/12 13:37, 2F
→
06/12 13:38, , 3F
06/12 13:38, 3F
→
06/12 13:49, , 4F
06/12 13:49, 4F
→
06/12 14:17, , 5F
06/12 14:17, 5F
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章