以二進位方式讀取時,要判斷檔案是否到尾端,可以使用 feof 函式: ... unsigned char ch; int count = 0; while(!feof(fp)) { fread(&ch, sizeof(char), 1, ...
確定! 回上一頁