C++ `endl` 与 `\n` 的区别
2020-12-13 02:06
阅读:487
“
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).”
文章来自:搜素材网的编程语言模块,转载请注明文章出处。
文章标题:C++ `endl` 与 `\n` 的区别
文章链接:http://soscw.com/index.php/essay/24895.html
文章标题:C++ `endl` 与 `\n` 的区别
文章链接:http://soscw.com/index.php/essay/24895.html
评论
亲,登录后才可以留言!