You may already have used iostreams in the past-the traditional iostreams. The iostreams included in the Standard C++ Library are mostly compatible, yet slightly different from what you know. The most apparent change is that the new iostream classes are templates, taking the type of the character as a template parameter.
The traditional iostreams were of limited use. They could handle only byte streams; in other words, they read files byte per byte, and worked internally with a buffer of bytes. They had problems with languages that have alphabets containing thousands of characters. These alphabets are encoded as multibytes for storage on external devices like files, and represented as wide characters internally. They required a code conversion with each input and output.
The new templatized iostreams can handle large alphabets. These iostreams can be instantiated for one-byte skinny characters of type char, and for wide characters of type wchar_t. In fact, you can instantiate iostream classes for any user-defined character type. Chapter 20 describes in detail how this can be done.
OEM Edition, ©Copyright 1999, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.