Thinking in C++ Vol 2 - Practical Programming |
Prev |
Home |
Next |
You can do much more with the general
I/O problem than just take standard I/O and turn it into a class.
Wouldn t it be nice if you could make all the usual
receptacles standard I/O, files, and even blocks of memory look the same so
that you need to remember only one interface? That s the idea behind iostreams.
They re much easier, safer, and sometimes even more efficient than the assorted
functions from the Standard C stdio library.
The iostreams classes are usually the first part of the C++
library that new C++ programmers learn to use. This chapter discusses how
iostreams are an improvement over C s stdio facilities and explores the
behavior of file and string streams in addition to the standard console
streams.
Thinking in C++ Vol 2 - Practical Programming |
Prev |
Home |
Next |