The business of managing streams and buffers can get a bit complicated, but including the
iostream.h) file brings in several classes designed to implement and manage streams and buffers for you. The C++98 version of C++ I/O defines class templates in order to support both
wchar_t data. C++11 adds
char32_t specializations. By using the
typedef facility, C++ makes the
char specializations of these templates mimic the traditional non-template I/O implementation. Here are some of those classes (see Figure 17.3):
streambuf class provides memory for a buffer, along with class methods for filling the buffer, accessing buffer contents, flushing the buffer, and managing ...