【C++】cerr,cout,clog

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

posted @ 2017-03-03 20:14  CheerM  阅读(262)  评论(0编辑  收藏  举报