Team LiB
Previous Section Next Section

Appendix A. The Library

附录 A. 标准库

CONTENTS

Section A.1 Library Names and Headers

810

Section A.2 A Brief Tour of the Algorithms

811

Section A.3 The IO Library Revisited

825


This appendix presents additional useful details about the library. We'll start by collecting in one place the names we used from the standard library. Table A.1 on the next page lists each name and the header that defines that name.

本附录提供了标准库更多有用的细节。首先将标准库中的名字集中在一起,表 A.1 列出每个名字以及定义该名字的头文件。

Chapter 11 covered the library algorithms. That chapter illustrated how some of the more common algorithms are used, and described the architecture that underlies the algorithms library. In this Appendix, we list all the algorithms, organized by the kinds of operations they perform.

第十一章讨论标准库算法,那一章举例说明了怎样使用一些比较常用的算法,并描述了算法库的体系结构。本附录中将列出所有算法,按它们执行的操作种类组织。

We close by examining some additional IO library capabilities: format control, unformatted IO, and random access on files. Each IO type defines a collection of format states and associated functions to control those states. These format states give us finer control over how input and output works. The IO we've done has all been formattedthe input and output routines know about the types we use and format the data on input or output accordingly. There are also unformatted IO functions that deal with the stream at the char level, doing no interpretation of the data. In Chapter 8 we saw that the fstream type can read and write the same file. In this Appendix, we'll see how to do so.

本附录的最后考察了另一些 IO库的功能,包括格式控制、未格式化的 IO 和文件随机访问。每个 IO 类型定义了格式状态和控制这些状态的相关函数集合。使用这些格式状态我们能够更好地控制输入和输出的工作。我们已经做过的 IO 都是格式化的——输入和输出例程了解使用的类型,并据此格式化输入和输出数据。还有未格式化的 IO 函数,它们在 char 级别处理流,不解释数据。第八章介绍过 fstream 类型能读写同一文件,本附录将介绍怎样做到这一点。

Team LiB
Previous Section Next Section