Next: Streams
Up: Introduction to C++ Programming
Previous: Exercises
So far all input and output has been done by obtaining data from the
input stream cin and sending output to the output stream
cout. These streams have been connected to the keyboard and
screen respectively. There are many situations when these facilities
are not sufficient. For example:
In all these cases External Files are required. Thus if a program requires a significant amount of data to be entered then the data can be entered on a file using a text editor and this file used as the input medium while developing and testing the program. Similarly output can be sent to a file so that a permanent record of results is obtained.