【转】C语言fclose函数了解
来源:互联网 发布:日本轻小说知乎 编辑:程序博客网 时间:2024/05/22 23:03
原网址:http://blog.csdn.net/hgj125073/article/details/8287062
fclose()关闭关闭一个流,注意:使用fclose()函数就可以把缓冲区内最后剩余的数据输出到磁盘文件中,并释放文件指针和有关的缓冲区。
#include<stdio.h>
原型:
int fclose(FILE *stream);
int _fcloseall(void);
fclose returns 0 if the stream is successfully closed._fcloseall returns the total number of streams closed.
The _fcloseall function closes all open streams exceptstdin, stdout, stderr (and, in MS-DOS, _stdaux and _stdprn). It also closes and deletes any temporary files created by tmpfile. In both functions, all buffers associated with the stream are flushed prior to closing.
如果流成功关闭,fclose 返回 0,否则返回EOF(-1)。
如果流为NULL,而且程序可以继续执行,fclose设定error number给EINVAL,并返回EOF。
【FROM MSDN && 百科】
0 0
- 【转】C语言fclose函数了解
- C语言fclose函数了解
- C语言中fclose函数
- C语言的fclose()函数
- C语言函数fopen,fclose的用法
- C语言fclose()函数:关闭文件流
- C语言:文件函数 fopen(),fclose(),fwrite(),fread()
- C语言-printf、fprintf、fopen、fclose函数的用法
- C语言scanf函数了解
- C语言sscanf函数了解
- C语言fscanf函数了解
- C语言gets函数了解
- C语言fgets函数了解
- C语言fopen函数了解
- C语言fwrite函数了解
- C语言fread函数了解
- C语言fseek函数了解
- C语言ftell函数了解
- AndBase 学习笔记(一)之旋转木马实现
- AT 指令和常见错误码
- 49,枚举类型
- 官网 Android Studio下载地址
- 科学美国人~Steve Yegge
- 【转】C语言fclose函数了解
- Leetcode日记(4)---Median of Two Sorted Arrays
- MongoDB MapReduce 分组统计
- 修改系统状态栏颜色
- AFN的一些常见的用法(GET,POST)解析(XML,Json)
- android 透明度换算
- 07_Java变量类型
- 清除磁盘脱机策略
- IOS-36-Object-C语法之属性关键字的使用(assign/weak/strong/copy)