setvbuf
来自cppreference.com
|
|
该页由英文版wiki使用Google Translate机器翻译而来。
该翻译可能存在错误或用词不当。鼠标停留在文本上可以看到原版本。你可以帮助我们修正错误或改进翻译。参见说明请点击这里. |
| 在头文件 <stdio.h> 中定义
|
||
设置给定的文件流
stream的内部缓冲区. 原文:
Sets the internal buffer of the given file stream
stream. 目录 |
[编辑] 参数
| stream | - | 为 FILE 结构的指针。 | |||||||||
| buffer | - | 用户分配的缓冲区。 | |||||||||
| mode | - | 缓冲模式。模式类型它可以是下列值之一:
| |||||||||
| size | - | 分配可用缓冲长度(字节) |
[编辑] 返回值
0成功或失败时返回非零值.
原文:
0 on success or nonzero on failure.
[编辑] 注释
stream一直伴随着一个打开的文件后,此功能可能只使用,但是任何其他操作之前.原文:
This function may only be used after
stream has been associated with an open file, but before any other operation.buffer可以为null,在这种情况下,这个调用只调整内部缓冲区的大小.原文:
buffer may be null, in which case this call only resizes the internal buffer.[编辑] 示例
[编辑] 另请参阅
| 设置文件流的缓冲区 (函数) | |
| C++ documentation for setvbuf
| |