首页 > 编程语言 > 详细

【C++】cerr,cout,clog

时间:2017-03-03 21:01:15      阅读:228      评论:0      收藏:0      [点我收藏+]

http://stackoverflow.com/questions/16772842/what-is-the-difference-between-cout-cerr-clog-of-iostream-header-in-c-when

 

cerr for errors

cout for normal output

clog for logging

 

The major difference is that std::cerr is not buffered like the other two. 

 

cout 会将输出信息先写入缓存,而cerr会将消息直接输出到console

【C++】cerr,cout,clog

原文:http://www.cnblogs.com/cheermyang/p/6498283.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!