Re: [問題] 花了很久的時間

看板C_and_CPP (C/C++)作者 (nahgnimiast)時間16年前 (2010/03/14 03:12), 編輯推噓1(100)
留言1則, 1人參與, 最新討論串2/3 (看更多)
下面把input的資料,都印到output ,其他請你自行改一下吧。 char line[1024]; FILE *inp = fopen ("input.txt", "r"); FILE *outp = fopen ("output.txt", "w"); if(inp && outp) { while(EOF != fscanf(inp, "%[^\n]\n", line)) { fprintf(outp, "%s\n", line); } } fclose (inp); fclose (outp); -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 59.121.138.187

03/14 20:59, , 1F
謝謝 晚一點 試試
03/14 20:59, 1F
文章代碼(AID): #1Bc-EFt2 (C_and_CPP)
文章代碼(AID): #1Bc-EFt2 (C_and_CPP)