CSCI 1300 - Exercise 5
Input and Output from Files
What You'll Get from This Exercise
Until now, all of the input and output of your programs has been with the
keyboard and monitor. You have used cin for the input stream and cout for the
output stream. In this exercise, youíll learn how to use a disk file for input
|PC Labs in the
|CR 235 ||CR 239
|CR 244 ||CR 252 (24 hours)
|CH 107 ||ME 107
|Other campus sites are|
Open a DOS window. If the CS1300 software is not permanently
installed on your machine, then use one of these methods:
If you get the message "Out of environment space", then:
- Click on the MS-DOS icon in the top left corner of the window.
- Select Properties from the pop-up menu.
- Select the Memory tab from the command box.
- Click the arrow on the Initial Environment box. Move down in the
box as far as possible (by clicking the downward arrow). Click on the
biggest number that you see in this box.
- Click OK in the command box.
- Click OK in the MS-DOS Prompt information box.
- Stop the DOS Session by clicking the X in the top-right or by
typing the command "exit".
- Restart a new DOS session and try running your commands again.