search for books and compare prices
Tables of Contents for The C++ Standard Library
Chapter/Section Title
Page #
Page Count
Preface
xvii
 
Acknowledgments
xix
 
About this Book
1
6
Why this Book
1
1
What You Should Know Before Reading this Book
2
1
Style and Structure of the Book
2
2
How to Read this Book
4
1
State of the Art
5
1
Example Code and Additional Information
5
1
Feedback
5
2
Introduction to C++ and the Standard Library
7
16
History
7
2
New Language Features
9
12
Templates
9
5
Explicit Initialization for Fundamental Types
14
1
Exception Handing
15
1
Namespaces
16
2
Type bool
18
1
Keyword explicit
18
1
New Operators for Type Conversion
19
1
Initialization of Constant Static Members
20
1
Definition of main ()
21
1
Complexity and the Big-O Notation
21
2
General Concepts
23
10
Namespace std
23
1
Header Files
24
1
Error and Exception Handling
25
6
Standard Exception Classes
25
3
Members of Exception Classes
28
1
Throwing Standard Exceptions
29
1
Deriving Standard Exception Classes
30
1
Allocators
31
2
Utilities
33
40
Pairs
33
5
Convenience Function make_pair()
36
1
Examples of Pair Usage
37
1
Class auto_ptr
38
21
Motivation of Class auto_ptr
38
2
Transfer of Ownership by auto_ptr
40
4
auto_ptrs as Members
44
2
Misusing auto_ptrs
46
1
auto_ptr Examples
47
4
Class auto_ptr in Detail
51
8
Numeric Limits
59
7
Auxiliary Functions
66
3
Processing the Minimum and Maximum
66
1
Swapping Two Values
67
2
Supplementary Comparison Operators
69
2
Header Files <cstddef> and <cstdlib>
71
2
Definitions in <cstddef>
71
1
Definitions in <cstdlib>
71
2
The Standard Template Library
73
70
STL Components
73
2
Containers
75
8
Sequence Containers
76
5
Associative Containers
81
1
Container Adapters
82
1
Iterators
83
11
Examples of Using Associative Containers
86
7
Iterator Categories
93
1
Algorithms
94
10
Ranges
97
4
Handling Multiple Ranges
101
3
Iterator Adapters
104
7
Insert Iterators
104
3
Stream Iterators
107
2
Reverse Iterators
109
2
Manipulating Algorithms
111
6
``Removing'' Elements
111
4
Manipulating Algorithms and Associative Containers
115
1
Algorithms versus Member Functions
116
1
User-Defined Generic Functions
117
2
Functions as Algorithm Arguments
119
5
Examples of Using Functions as Algorithm Arguments
119
2
Predicates
121
3
Function Objects
124
10
What Are Function Objects?
124
7
Predefined Function Objects
131
3
Container Elements
134
2
Requirements for Container Elements
134
1
Value Semantics or Reference Semantics
135
1
Errors and Exceptions Inside the STL
136
5
Error Handling
137
2
Exception Handling
139
2
Extending the STL
141
2
STL Containers
143
108
Common Container Abilities and Operations
144
4
Common Container Abilities
144
1
Common Container Operations
144
4
Vectors
148
12
Abilities of Vectors
148
2
Vector Operations
150
5
Using Vectors as Ordinary Arrays
155
1
Exception Handling
155
1
Examples of Using Vectors
156
2
Class vector <bool>
158
2
Deques
160
6
Abilities of Deques
161
1
Deque Operations
162
2
Exception Handling
164
1
Examples of Using Deques
164
2
Lists
166
9
Abilities of Lists
166
1
List Operations
167
5
Exception Handling
172
1
Examples of Using Lists
172
3
Sets and Multisets
175
19
Abilities of Sets and Multisets
176
1
Set and Multiset Operations
177
8
Exception Handling
185
1
Examples of Using Sets and Multisets
186
5
Example of Specifying the Sorting Criterion at Runtime
191
3
Maps and Multimaps
194
23
Abilities of Maps and Multimaps
195
1
Map and Multimap Operations
196
9
Using Maps as Associative Arrays
205
2
Exception Handling
207
1
Examples of Using Maps and Multimaps
207
6
Example with Maps, Strings, and Sorting Criterion at Runtime
213
4
Other STL Containers
217
5
Strings as STL Containers
217
1
Ordinary Arrays as STL Containers
218
3
Hash Tables
221
1
Implementing Reference Semantics
222
4
When to Use which Container
226
4
Container Types and Members in Detail
230
21
Type Definitions
230
1
Create, Copy, and Destroy Operations
231
2
Nonmodifying Operations
233
3
Assignments
236
1
Direct Element Access
237
2
Operations to Generate Iterators
239
1
Inserting and Removing Elements
240
4
Special Member Functions for Lists
244
2
Allocator Support
246
2
Overview of Exception Handling in STL Containers
248
3
STL Iterators
251
42
Header Files for Iterators
251
1
Iterator Categories
251
8
Input Iterators
252
1
Output Iterators
253
1
Forward Iterators
254
1
Bidirectional Iterators
255
1
Random Access Iterators
255
3
The Increment and Decrement Problem of Vector Iterators
258
1
Auxiliary Iterator Functions
259
5
Stepping Iterators Using advance()
259
2
Processing Iterator Distance Using distance()
261
2
Swapping Iterator Values Using iter_swap()
263
1
Iterator Adapters
264
19
Reverse Iterators
264
7
Insert Iterators
271
6
Stream Iterators
277
6
Iterator Traits
283
10
Writing Generic Functions for Iterators
285
3
User-Defined Iterators
288
5
STL Function Objects
293
28
The Concept of Function Objects
293
12
Function Objects as Sorting Criteria
294
2
Function Objects with Internal State
296
4
The Return Value of for_each()
300
2
Predicates versus Function Objects
302
3
Predefined Function Objects
305
8
Function Adapters
306
1
Function Adapters for Member Functions
307
2
Function Adapters for Ordinary Functions
309
1
User-Defined Function Objects for Function Adapters
310
3
Supplementary Composing Function Objects
313
8
Unary Compose Function Object Adapters
314
4
Binary Compose Function Object Adapters
318
3
STL Algorithms
321
114
Algorithm Header Files
321
1
Algorithm Overview
322
10
A Brief Introduction
322
1
Classification of Algorithms
323
9
Auxiliary Functions
332
2
The for_each() Algorithm
334
4
Nonmodifying Algorithms
338
25
Counting Elements
338
1
Minimum and Maximum
339
2
Searching Elements
341
15
Comparing Ranges
356
7
Modifying Algorithms
363
15
Copying Elements
363
3
Transforming and Combining Elements
366
4
Swapping Elements
370
2
Assigning New Values
372
3
Replacing Elements
375
3
Removing Algorithms
378
8
Removing Certain Values
378
3
Removing Duplicates
381
5
Mutating Algorithms
386
11
Reversing the Order of Elements
386
2
Rotating Elements
388
3
Permuting Elements
391
2
Shuffling Elements
393
2
Moving Elements to the Front
395
2
Sorting Algorithms
397
12
Sorting All Elements
397
3
Partial Sorting
400
4
Sorting According to the nth Element
404
2
Heap Algorithms
406
3
Sorted Range Algorithms
409
16
Searching Elements
410
6
Merging Elements
416
9
Numeric Algorithms
425
10
Processing Results
425
4
Converting Relative and Absolute Values
429
6
Special Containers
435
36
Stacks
435
9
The Core Interface
436
1
Example of Using Stacks
437
1
Class stack<> in Detail
438
3
A User-Defined Stack Class
441
3
Queues
444
9
The Core Interface
445
1
Example of Using Queues
446
1
Class queue<> in Detail
447
3
A User-Defined Queue Class
450
3
Priority Queues
453
7
The Core Interface
455
1
Example of Using Priority Queues
455
1
Class priority_queue<> in Detail
456
4
Bitsets
460
11
Examples of Using Bitsets
460
3
Class bitset in Detail
463
8
Strings
471
58
Motivation
471
8
A First Example: Extracting a Temporary File Name
472
4
A Second Example: Extracting Words and Printing Them Backward
476
3
Description of the String Classes
479
28
String Types
479
2
Operation Overview
481
2
Constructors and Destructors
483
1
Strings and C-Strings
484
1
Size and Capacity
485
2
Element Access
487
1
Comparisons
488
1
Modifiers
489
3
Substrings and String Concatenation
492
1
Input/Output Operators
492
1
Searching and Finding
493
2
The Value npos
495
2
Iterator Support for Strings
497
6
Internationalization
503
3
Performance
506
1
Strings and Vectors
506
1
String Class in Detail
507
22
Type Definitions and Static Values
507
1
Create, Copy, and Destroy Operations
508
2
Operations for Size and Capacity
510
1
Comparisons
511
1
Character Access
512
1
Generating C-Strings and Character Arrays
513
1
Modifying Operations
514
6
Searching and Finding
520
4
Substrings and String Concatenation
524
1
Input/Output Functions
524
1
Generating Iterators
525
1
Allocator Support
526
3
Numerics
529
54
Complex Numbers
529
18
Examples Using Class Complex
530
3
Operations for Complex Numbers
533
8
Class complex<> in Detail
541
6
Valarrays
547
34
Getting to Know Valarrays
547
6
Valarray Subsets
553
16
Class valarray in Detail
569
6
Valarray Subset Classes in Detail
575
6
Global Numeric Functions
581
2
Input/Output Using Stream Classes
583
102
Common Background of I/O Streams
584
4
Stream Objects
584
1
Stream Classes
584
1
Global Stream Objects
585
1
Stream Operators
586
1
Manipulators
586
1
A Simple Example
587
1
Fundamental Stream Classes and Objects
588
5
Classes and Class Hierarchy
588
3
Global Stream Objects
591
1
Header Files
592
1
Standard Stream Operators « and »
593
4
Output Operator «
593
1
Input Operator»
594
1
Input/Output of Special Types
595
2
State of Streams
597
10
Constants for the State of Streams
597
1
Member Functions Accessing the State of Streams
598
2
Stream State and Boolean Conditions
600
2
Stream State and Exceptions
602
5
Standard Input/Output Functions
607
5
Member Functions for Input
607
3
Member Functions for Output
610
1
Example Uses
611
1
Manipulators
612
3
How Manipulators Work
612
2
User-Defined Manipulators
614
1
Formatting
615
10
Format Flags
615
2
Input/Output Format of Boolean Values
617
1
Field Width, Fill Character, and Adjustment
618
2
Positive Sign and Uppercase Letters
620
1
Numeric Base
621
2
Floating-Point Notation
623
2
General Formatting Definitions
625
1
Internationalization
625
2
File Access
627
10
File Flags
631
3
Random Access
634
3
Using File Descriptors
637
1
Connecting Input and Output Streams
637
8
Loose Coupling Using tie ()
637
1
Tight Coupling Using Stream Buffers
638
3
Redirecting Standard Streams
641
2
Streams for Reading and Writing
643
2
Stream Classes for Strings
645
7
String Stream Classes
645
4
char* Stream Classes
649
3
Input/Output Operators for User-Defined Types
652
11
Implementing Output Operators
652
2
Implementing Input Operators
654
2
Input/Output Using Auxiliary Functions
656
2
User-Defined Operators Using Unformatted Functions
658
1
User-Defined Format Flags
659
3
Conventions for User-Defined Input/Output Operators
662
1
The Stream Buffer Classes
663
18
User's View of Stream Buffers
663
2
Stream Buffer Iterators
665
3
User-Defined Stream Buffers
668
13
Performance Issues
681
4
Synchronization with C's Standard Streams
682
1
Buffering in Stream Buffers
682
1
Using Stream Buffers Directly
683
2
Internationalization
685
42
Different Character Encodings
686
6
Wide-Character and Multibyte Text
686
1
Character Traits
687
4
Internationalization of Special Characters
691
1
The Concept of Locales
692
8
Using Locales
693
5
Locale Facets
698
2
Locales in Detail
700
4
Facts in Detail
704
23
Numeric Formatting
705
3
Time and Date Formatting
708
3
Monetary Formatting
711
4
Character Classification and Conversion
715
9
String Collation
724
1
Internationalized Messages
725
2
Allocators
727
16
Using Allocators as an Application Programmer
727
1
Using Allocators as a Library Programmer
728
4
The Default Allocator
732
3
A User-Defined Allocator
735
2
Allocators in Detail
737
3
Type Definitions
737
2
Operations
739
1
Utilities for Uninitialized Memory in Detail
740
3
Internet Resources
743
2
Bibliography
745
2
Index
747