冲洗所有打开的标准输出流

  fflush(NULL);

int fflush(FILE *stream);
Description
  For output streams, fflush() forces a write of all user-space buffered data for the given output or update stream via the stream’s underlying write function. For input streams, fflush() discards any buffered data that has been fetched from the underlying file, but has not been consumed by the application. The open status of the stream is unaffected.
  If the stream argument is NULL, fflush() flushes all open output streams.

  在fflush的帮助手册的描述里提及:如果stream参数被置空,fflush冲洗所有打开的输出流。

猜你喜欢

转载自blog.csdn.net/The_perfect_world/article/details/89402873