std::fclose
来自cppreference.com
![]() |
该页由英文版wiki使用Google Translate机器翻译而来。
该翻译可能存在错误或用词不当。鼠标停留在文本上可以看到原版本。你可以帮助我们修正错误或改进翻译。参见说明请点击这里. |
在头文件 <cstdio> 中定义
|
||
int fclose( FILE *stream ); |
||
关闭指定的文件流。任何不成文的缓冲数据刷新到操作系统。任何未读的缓冲数据被丢弃
原文:
Closes the given file stream. Any unwritten buffered data are flushed to the OS. Any unread buffered data are discarded.
无论操作成功,则流不再与文件相关联,和分配的缓冲区std::setbuf或std::setvbuf,如果有的话,也是分解和释放,如果使用自动分配.
原文:
Whether or not the operation succeeds, the stream is no longer associated with a file, and the buffer allocated by std::setbuf or std::setvbuf, if any, is also disassociated and deallocated if automatic allocation was used.
目录 |
[编辑] 参数
stream | - | 关闭文件流
|
[编辑] 返回值
0成功,EOF其他方式
[编辑] 示例
本章尚未完成 原因:暂无示例 |
[编辑] 另请参阅
打开一个文件 (函数) | |
打开一个现有的流用不同的名称 原文: open an existing stream with a different name (函数) | |
冲放区的缓冲区和关闭相关的文件 原文: flushes the put area buffer and closes the associated file (公共成员函数of std::basic_filebuf )
| |
C documentation for fclose
|