First page Back Continue Last page Overview Graphics
The problem of reading structured data
The example above demonstrates that even reading a primitive data type such as an integer using low-level streams is a rather hard task, which requires intricate bitwise operations.
However, this is merely an example, there are many types of structured data which we may encounter – numbers, lines in a text file etc.
However, we would like to be able to read/write structured data from various input and output devices.
A straightforward (and bad) solution would be ... (?)