What is the difference between cout, cerr, clog of iostream header in c++? When to use which one?

后端 未结 7 1549
小蘑菇
小蘑菇 2020-12-07 08:32

I tried researching the difference between cout, cerr and clog on the internet but couldn\'t find a perfect answer. I still am not cle

7条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-07 08:51

    • Use cout for the standard output.
    • Use cerr to show errors.
    • Use clog for logging.

提交回复
热议问题