開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
Visual Studio 2015
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
問題(Question):
在副程式中的fseek做指標的位移,永遠指向文字檔(txt)的開頭
餵入的資料(Input):
argv[1]為需過濾文字的文字檔=that\n this
argv[2]為文章,有文字需被過濾=this is a book, that is a book.
預期的正確結果(Expected Output):
argv[2]的txt檔過濾後為 is a book, is a book.
錯誤結果(Wrong Output):
因為fseek沒有發揮作用(?
導致一直從字首讀,會一直增加空白
程式碼(Code):(請善用置底文網頁, 記得排版)
http://ideone.com/yWJtA9 <