- Up until now, we have been using the extraction (>>) operator and insertion operator (<<) for reading/writing streams
- Convenient, easy to use; consistent interface for programmers
- There are limitations to these operators; we have seen so with cin
- Better (safer) ways to read data from streams; get(), getline()
Our earlier example showed how we could copy the contents of one file to another. This is what we started with:
1 1 1
2 4 8
3 9 27
4 16 64
5 25 125
And this is what we ended up with
111248392741664525125
We need a way to preserve the formatting of the input file. Remember: the extraction operator skips all whitespace (spaces, tabs, newlines.)