c语言fcloseall函数用法实例介绍。fcloseall函数的返回值,函数 fcloseall() 将所有打开的流与其底层的文件或功能集合关闭。任何缓冲的数据都将首先被写入,使用 fflush(3) 。另外标准流 (stdin,stdout 和 stderr) 也被关闭。
NAME
fcloseall – 关闭所有打开的流
头文件的引入以及函数返回类型:
#define _GNU_SOURCE
#include <stdio.h>
int fcloseall(void);
函数说明:
函数 fcloseall 将所有打开的流与它们底层的文件或功能集合断开。任何缓冲的数据都将首先被写入,使用 fflush(3) 。注意标准流 (stdin,stdout 和 stderr) 也被关闭。
fcloseall函数的返回值
这个函数总是返回 0。
SEE ALSO 参见
fclose(3), close(2), fflush(3), fopen(3), setbuf(3)
NAME
fcloseall – close all open streams
SYNOPSIS
#define _GNU_SOURCE
#include <stdio.h>
int fcloseall(void);
DESCRIPTION
The fcloseall function dissociates all open streams from its underlying file or set of functions. Any buffered output data is written first, using fflush(3). Note that the standard streams (stdin, stdout and stderr) are also closed.
RETURN VALUE
This function always returns 0.
SEE ALSO
fclose(3), close(2), fflush(3), fopen(3), setbuf(3)