devxlogo

Standard Streams

Standard Streams

C++ provides four standard I/O streams that are automatically instantiated before program’s outset. They are defined in the standard header :

 cin    // standard input stream of charcout  // standard output stream of char cerr  // standard unbuffered output stream for error messagesclog  // standard output stream for error messages

The difference between cerr and clog is that cerr is unbuffered, whereas clog is buffered. In addition, each of these four streams has a corresponding wide character version:

 wcin wcout wcerr wclog 
See also  How to Create and Deploy QR Codes Online: A Comprehensive Guide
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist