§ 解释 函数名: fcloseall 功 能: 关闭打开流 用 法: int fcloseall(void); § 程序例 #include <stdio.h> int main(void) { int streams_closed; /* open two streams */ fopen("DUMMY.ONE", "w"); fopen("DUMMY.TWO", "w"); /* close the open streams */ streams_closed = fcloseall(); if (streams_closed == EOF) /* issue an error message */ perror("Error"); else /* print result of fcloseall() function */ printf("%d streams were closed.\", streams_closed); return 0; } |