First page Back Continue Last page Overview Graphics
Case study I: Reading a file of integers
- Suppose we are given a file which contains a list of integers. 
- We would like to read all number from the file and store them somewhere.
- Let us assume that the number of integers n is known in advance (e.g. N=100).
- Here is what the code would look like if we only make use of the low-level input streams we know so far: