ferror 文法: #include <stdio.h> int ferror( FILE *stream ); ferror()函數檢查stream(流)中的錯誤, 如果沒發生錯誤傳回0,否則傳回非零. 如果發生錯誤, 使用perror()檢測發生什麼錯誤.