一些问题


flush the buffer: “Output buffers can be explicitly flushed to force the buffer to be written. By default, reading “cin” flushes “cout”; “cout” is also flushed when the program ends normally.”
http://stackoverflow.com/questions/15042849/what-does-flushing-the-buffer-mean
答:
Consider writing to a file. This is an expensive operation. If in your code you write one byte at a time, then each write of a byte is going to be very costly. So a common way to improve performance is to store the data that you are writing in a temporary buffer. Only when there is a lot of data is the buffer written to the file. By postponing the writes, and writing a large block in one go, performance is improved.
所以,”flush the buffer”指将buffer中的所有数据输出到某一处(如存储到文件),然后清空buffer。