[C] 关闭打开流 →→→→→进入此内容的聊天室

来自 , 2020-08-14, 写在 C, 查看 112 次.
URL http://www.code666.cn/view/598920e1
  1. #include <stdio.h>
  2.  
  3. int main ( void )
  4. {
  5.         int streams_closed;
  6.  
  7.         /* open two streams */
  8.         fopen ( "DUMMY.ONE", "w" );
  9.         fopen ( "DUMMY.TWO", "w" );
  10.  
  11.         /* close the open streams */
  12.         streams_closed = fcloseall();
  13.  
  14.         if ( streams_closed == EOF )
  15.                 /* issue an error message */
  16.                 perror ( "Error" );
  17.         else
  18.                 /* print result of fcloseall() function */
  19.                 printf ( "%d streams were closed.\n", streams_closed );
  20.  
  21.         return 0;
  22. }
  23.  

回复 "关闭打开流"

这儿你可以回复上面这条便签

captcha