文件名称:
C++ Standard Library A.Tutorial.and.Reference
开发工具:
文件大小: 3mb
下载次数: 0
上传时间: 2010-09-26
详细说明: The C++ standard library provides different components that are somewhat but not totally independent of each other, so there is no easy way to describe each part without mentioning others. I considered several different approaches for presenting the contents of this book. One was on the order of the C++ standard. However, this is not the best way to explain the components of the C++ standard library from scratch. Another was to start with an overview of all components followed by chapters that provided more details. Alternativel y, I could have sorted the components, trying to find an order that had a minimum of cross-references to other sections. My solution was to use a mixture of all three approaches. I start with a brief introduction of the general concepts and the utilities that are used by the library. Then, I describe all the components, each in one or more chapters. The first component is the standard template library (STL). There is no doubt that the STL is the most powerful, most complex, and most exciting part of the library. Its design influences other components heavily. Then I describe the more selfexplanatory components, such as special containers, strings, and numeric classes. The next component discussed is one you probably know and use already: the IOStream library. It is followed by a discussion of internationalization, which had some influence on the IOStream library. Each component description begins with the component's purpose, design, and some examples. Next, a detailed description follows that begins with different ways to use the component, as well as any traps and pitfalls associated with it. The description usually ends with a reference section, in which you can find the exact signature and definition of a component's classes and its functions. The following is a description of the book's contents. The first four chapters introduce this book and the C++ standard library in general: ·Chapter 1: About this Book This chapter (which you are reading right now) introduces the book's subject and describes its contents. ·Chapter 2: Introduction to C++ and the Standard Library This chapter provides a brief overview of the history of the C++ standard library and the context of its standardization. It also contains some general hints regarding the technical background for this book and the library, such as new language features and the concept of complexity. ·Chapter 3: General Concepts This chapter describes the fundamental concepts of the library that you need to understand to work with all the components. In particular, it introduces the namespace std, the format of header files, and the general support of error and exception handling. ·Chapter 4: Utilities This chapter describes several small utilities provided for the user of the library and for the library itself. In particular, it describes auxiliary functions such as max(), min(), and swap(), types pair and auto_ptr, as well as numeric_limits, which provide more information about implementation-specific details of numeric data types. Chapters 5 through 9 describe all aspects of the STL: ·Chapter 5: The Standard Template Library This chapter presents a detailed introduction to the concept of the STL, which provides container classes and algorithms that are used to process collections of data. It explains step-by-step the concept, the problems, and the special programming techniques of the STL, as well as the roles of its parts. ·Chapter 6: STL Containers This chapter explains the concepts and describes the abilities of the STL's container classes. First it describes the differences between vectors, deques, lists, sets, and maps, then their common abilities, and all with typical examples. Lastly it lists and describes all container functions in form of a handy reference. ·Chapter 7: STL Iterators This chapter deals in detail with the STL's iterator classes. In particular, it explains the different iterator categories, the auxiliary functions for iterators, and the iterator adapters, such as stream iterators, reverse iterators, and insert iterators. ·Chapter 8: STL Function Objects This chapter details the STL's function object classes. ·Chapter 9: STL Algorithms This chapter lists and describes the STL's algorithms. After a brief introduction and comparison of the algorithms, each algorithm is described in detail followed by one or more example programs. Chapters 10 through 12 describe "simple" individual standard classes: ·Chapter 10: Special Containers This chapter describes the different special container classes of the C++ standard library. It covers the container adapters for queues and stacks, as well as the class bitset, which manages a bitfield with an arbitrary number of bits or flags. ·Chapter 11: Strings This chapter describes the string types of the C++ standard library (yes, there are more than one). The standard provides strings as kind of "self-explanatory" fundamental data types with the ability to use different types of characters. ·Chapter 12: Numerics This chapter describes the numeric components of the C++ standard library. In particular, it covers types for complex numbers and classes for the processing of arrays of numeric values (the latter may be used for matrices, vectors, and equations). Chapters 13 and 14 deal with I/O and internationalization (two closely related subjects): ·Chapter 13: Input/Output Using Stream Classes This chapter covers the I/O component of C++. This component is the standardized form of the commonly known IOStream library. The chapter also describes details that may be important to programmers but are typically not so well known. For example, it describes the correct way to define and integrate special I/O channels, which are often implemented incorrectly in practice. ·Chapter 14: Internationalization This chapter covers the concepts and classes for the internationalization of programs. In particular, it describes the handling of different character sets, as well as the use of different formats for such values as floating-point numbers and dates. The rest of the book contains: ·Chapter 15: Allocators This chapter describes the concept of different memory models in the C++ standard library. ·An appendix with o Internet Resources o Bibliography Table of Contents Preface Acknowledgments 1. About this Book 1.1 Why this Book 1.2 What You Should Know Before Reading this Book 1.3 Style and Structure of the Book 1.4 How to Read this Book 1.5 State of the Art 1.6 Example Code and Additional Information 1.7 Feedback 2. Introduction to C++ and the Standard Library 2.1 History 2.2 New Language Features 2.3 Complexity and the Big-O Notation 3. General Concepts 3.1 Namespace std 3.2 Header Files 3.3 Error and Exception Handling 3.4 Allocators 4. Utilities 4.1 Pairs 4.1.1 Convenience Function make_pair() 4.1.2 Examples of Pair Usage 4.2 Class auto_ptr 4.3 Numeric Limits 4.4 Auxiliary Functions 4.5 Supplementary Comparison Operators 4.6 Header Files and 5. The Standard Template Library 5.1 STL Components 5.2 Containers 5.3 Iterators 5.4 Algorithms 5.5 Iterator Adapters 5.6 Manipulating Algorithms 5.7 User-Defined Generic Functions 5.8 Functions as Algorithm Arguments 5.9 Function Objects 5.10 Container Elements 5.11 Errors and Exceptions Inside the STL 5.12 Extending the STL 6. STL Containers 6.1 Common Container Abilities and Operations 6.2 Vectors 6.3 Deques 6.4 Lists 6.5 Sets and Multisets 6.6 Maps and Multimaps 6.7 Other STL Containers 6.8 Implementing Reference Semantics 6.9 When to Use which Container 6.10 Container Types and Members in Detail 7. STL Iterators 7.1 Header Files for Iterators 7.2 Iterator Categories 7.3 Auxiliary Iterator Functions 7.4 Iterator Adapters 7.5 Iterator Traits 8. STL Function Objects 8.1 The Concept of Function Objects 8.2 Predefined Function Objects 8.3 Supplementary Composing Function Objects 9. STL Algorithms 9.1 Algorithm Header Files 9.2 Algorithm Overview 9.3 Auxiliary Functions 9.4 The for_each() Algorithm 9.5 Nonmodifying Algorithms 9.6 Modifying Algorithms 9.7 Removing Algorithms 9.8 Mutating Algorithms 9.9 Sorting Algorithms 9.10 Sorted Range Algorithms 9.11 Numeric Algorithms 10. Special Containers 10.1 Stacks 10.2 Queues 10.3 Priority Queues 10.4 Bitsets 11. Strings 11.1 Motivation 11.2 Description of the String Classes 11.3 String Class in Detail 12. Numerics 12.1 Complex Numbers 12.2 Valarrays 12.3 Global Numeric Functions 13. Input/Output Using Stream Classes 13.1 Common Background of I/O Streams 13.2 Fundamental Stream Classes and Objects 13.3 Standard Stream Operators << and >> 13.4 State of Streams 13.5 Standard Input/Output Functions 13.6 Manipulators 13.7 Formatting 13.8 Internationalization 13.9 File Access 13.10 Connecting Input and Output Streams 13.11 Stream Classes for Strings 13.12 Input/Output Operators for User-Defined Types 13.13 The Stream Buffer Classes 13.14 Performance Issues 14. Internationalization 14.1 Different Character Encodings 14.2 The Concept of Locales 14.3 Locales in Detail 14.4 Facets in Detail 15. Allocators 15.1 Using Allocators as an Application Programmer 15.2 Using Allocators as a Library Programmer 15.3 The Default Allocator 15.4 A User-Defined Allocator 15.5 Allocators in Detail 15.6 Utilities for Uninitialized Memory in Detail Internet Resources Where You Can Get the Standard Internet Addresses/URLs Bibliography o Index ...展开收缩
(系统自动生成,下载前可以参看下载内容)
下载文件列表
相关说明
- 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
- 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。
- 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
- 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
- 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
- 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.