作者:
RobertH (R先生)
2018-11-07 21:20:36開發平台(Platform): (Ex: Win10, Linux, ...)
Win10
編譯器(Ex: GCC, clang, VC++...)+目標環境(跟開發平台不同的話需列出)
Code block
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
問題(Question):讀檔換行,希望一次讀一行到矩陣中,下一次iteration再讀第二行進
來同樣的矩陣中,進行預算
餵入的資料(Input):
55 148 532
23 72 455
預期的正確結果(Expected Output):
錯誤結果(Wrong Output):
程式碼(Code):(請善用置底文網頁, 記得排版,禁止使用圖檔)
for(iteration=0;iterations<2;iteration++)
for(i=0;i<3;i++)
infile >> a[i] ;
....
補充說明(Supplement):
想請問各位大大,使用infile >> 有什麼指令有辦法直接換行嗎?謝謝