What you see is all you get.
21.1 Introduction
设计和实现general input/output facility为一个编程语言是非常难的。传统上,I/O被设计成只处理内置类型。c++允许自定义类型,这些类型的输入输出必须被处理,被考虑进来。I/O设备必须,简单,方便,安全,效率高,flexible灵活。最重要的是全面的,完善的complete。没有人能够come up一个解决方案,满足所有的人。It should therefore be possible for a user to provide alternative I/O facilities and to extend the standard I/O facilities to cope with special applications.
C++允许用户自定义类型,这些类型可以像内置类型一样高效和使用方便。It is therefore a reasonable requirement that an I/O facility ofr C++ should be provided in C++ using only facilities available to every programmer.输入输出流设备就是为了满足这些要求的努力产生的结果。
$21.2 output:What the application programmer thinks of as output is really the conversion of objects of types, such as int, char*, and Emplyee_record, into sequences of characters. The facilities for writing built-in and user-defined types to output are described.
$21.3 Input:The facilities for requesting input of characters, string, and values of other built-in and user-defined types are presented.
$21.4 Formatting: There are often specific requirements for the layout of the output.
$21.5 Files and Streams: By default every C++ program can use standard streams, such as standard output(cout), standard input(cin), and error output(cerr). To use other devices or files, streams must be created and attached to those files or devices. The mechanisms for opening and closing files and for attaching streams to files and strings are described.
$21.6 Buffering: To make I/O efficient, we must use a buffering strategy that is suitable for both the data written(read) and the destination it is written to (read from). The basic techniques for buffering are presented.
$21.7 Locale:
$21.8 C I/O: