

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is the difference between cerr and cout streams in c++?
cout is an object of the stdout stream, while cerr is an object of the stderr stream.
stdout and stderr are different streams, even though they both refer to console output by default. Redirecting (piping) one of them (e.g. program.exe >out.txt) would not affect the other.
Generally, stdout ought to be used for actual program output, whereas all information and error messages should be printed to stderr, in order that if the user redirects output to a file, information messages are still printed on the screen and not to the output file.
- Related Questions & Answers
- What are cin, cout and cerr streams in C++?
- What is the difference between cerr and clog streams in c++?
- What is the difference between cin and cout streams in c++?
- What is the difference between printf() and cout in C++?
- What is the difference between System.out, System.in and System.err streams in Java?
- Difference between Streams and Collections in Java 8
- What is the difference Between C and C++?
- What is C++ Standard Error Stream (cerr)?
- What is the necessity of byte streams and character streams in Java?
- Streams and Byte Streams in C#
- What is the difference between JavaScript and C++?
- What is the difference between | and || operators in c#?
- What is C++ Standard Output Stream (cout)?
- What is the difference between C++0x and C++11?
- What is the difference between ++i and i++ in c?
Advertisements