C++ `endl` 与 `\n` 的区别
2020-12-13 02:06
阅读:460
“
endl
, which is a special value called a manipulator. Writingendl
has the effect of ending the current line and flushing the buffer associated with that device. Flushing the buffer ensures that all the output the program has generated so far is actually written to the output stream, rather than sitting in memory waiting to be written.”-- Stanley B. Lippman. “C++ Primer, Fifth Edition (Jason Arnold‘s Library).”
评论
亲,登录后才可以留言!