+ 3
What is the difference between cout<< and cerr<<
4 odpowiedzi
+ 8
Both of the above statements will be en-route the output to the the standard output device i.e., monitor, by default, but semantically both are different in essence that
cout<< represent standard output stream
and
cerr<< represent standard error stream
+ 6
With cerr<< the output is immediately sent to the standard error stream while cout<< the output first goes to the buffer
+ 4
@Devender What about clog<<
+ 3
clog<< is rarely used. In fact is mere a clone of cerr <<