本文介绍了结束并冲洗缓冲区的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在 C ++入门书的第(1)章中,它提到了以下内容:
In the C++ primer book, in chapter (1), it mentions the following:
这里的刷新缓冲区是什么意思?
What is meant by "flushing the buffer" here?
推荐答案
通常在将输出写入目标之前对其进行缓冲设备。这样,当写入慢速访问设备(如文件)时,不必在每个字符后都访问设备。
Output is generally buffered before it's written to the intended device. That way, when writing to slow to access devices(like files), it doesn't have to access the device after every single character.
刷新意味着清空缓冲区,然后实际将其写入设备。
Flushing means emptying the buffer and actually writing it to the device.
这篇关于结束并冲洗缓冲区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!