Greetings

While reading I encountered a statement I did not understand what does it mean
"Cout is a predefiend object in C++ to correspond to the standard output stream

1- What is that exactly mean?
2- what is the standard output stream & standard input stream?

Standard out (STDOUT) and standard in (STDIN) are old C-language terms meaning the STDOUT = the terminal (screen) and STDIN meaning the keyboard. Most (but not all) operating systems allow you to redirect STDOUT and STDIN to/from a text file so that the data can be easily writen to a file instead of on the screen or read from a file instead of the keyboard. This feature comes in handy in a lot of real-life situations (for example *nix shell scripts) where the input data already exists in a text file.

Edited 3 Years Ago by Ancient Dragon

Thanks for the reply. When I wrote something like

cout << "Every age has a language of its own";

It's supposed that the sentence between the two quotation marks will not be targeted directly to the screen, but will be stored somewhere first before directed to the screen.

What is that place in which the sentence will be stored?

The same thing is done in a reverse way with the cin so the question is,

Is it the same storing place is used to store what is enetered by the user on the screen before assiging it to a variable of whatever was in the right hand side of the cin?

What does it mean that the header file iostream contains the declarations that are needed by the cout identifier and the << operator?. What does it mean by the declarations? If with an illustrative example of this would be the best.

What is the content of the namespace? what it means that certain names are recognized in namespace std including cout is declared within it! is not cout declaration exists in the iostream header file?

Edited 3 Years Ago by AmrMohammed

The word 'cout'stands for console output.The 'cout'is a standard output stream object .The standard output stream normally flows to the screen display.The 'cout'stream object is used to print the output on the computer screen.The 'cout'is part of 'isotream.h'header file

The word 'cout'stands for console output.

It stands for "character", as stated by a somewhat authoritative souce. That's fortunate too, because if cout were named after and designed for consoles and screen display only, it would be vastly inferior to the general stream we enjoy today.

This article has been dead for over six months. Start a new discussion instead.