Print Friendly and PDF
Discuss the meaning of each of the following objects: a) std::cin b) std::cout
Discuss the meaning of each of the following objects:

a) std::cin

b) std::cout

Solution:

The std:: before cout is required when we use names that we’ve brought into the program by the preprocessor directive #include . The notation std::cout specifies that we are using a name, in this case cout, that belongs to “namespace” std. The names cin (the standard input stream) and cerr (the standard error stream) also belong to namespace std.
zubairsaif

Zubair saif

A passionate writer who loves to write on new technology and programming

Post A Comment:

0 comments: