May 2012
Intermediate to advanced
679 pages
16h 56m
English
C++ has introduced simple to use objects like cin and cout for handling input–output. Objects cin and cout represent input stream and output stream, respectively. The cin represents standard input, usually keyboard, corresponding to stdin in C. Similarly, cout represents standard output, usually screen, corresponding to stdout in C. These are stream objects. Along with operators << and >> they allow programmer to handle input–output in very simplified manner. Figure 2.1 depicts pictorially this fact.
If we want to read any variable say int marks from keyboard, we have to say
cin >> marks;
Figure 2.1 Iostreams
If we want to write any variable say float money on the screen, ...
Read now
Unlock full access