码迷,mamicode.com
首页 > 编程语言 > 详细

【C++】cerr,cout,clog

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

标签:normal   cer   other   bsp   blank   ons   写入   head   .com   

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

标签:normal   cer   other   bsp   blank   ons   写入   head   .com   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!