 |
The C++ Standard Library: A Tutorial and Reference View Larger Image | Nicolai M. Josuttis Addison-Wesley, Hardcover, Published August 1999, 799 pages, ISBN 0201379260 | List Price: $74.99 Our Price: $57.95 You Save: $17.04 (23% Off)
| | | Availability: In-Stock |
Customer Reviews: 10 Average Customer Rating:      Write a Review and tell the world about this title! People who purchase this book frequently purchase: Books on similar topics, in best-seller order:Books from the same publisher, in best-seller order:
The C++ standard library provides a set of common classes and interfaces that greatly extend the core C++ language. The library, however, is not self-explanatory. To make full use of its components-and to benefit from their power-you need a resource that does far more than list the classes and their functions.
The C++ Standard Library not only provides comprehensive documentation of each library component, it also offers clearly written explanations of complex concepts, describes the practical programming details needed for effective use, and gives example after example of working code.
This thoroughly up-to-date book reflects the newest elements of the C++ standard library incorporated into the full ANSI/ISO C++ language standard. In particular, the text focuses on the Standard Template Library (STL), examining containers, iterators, function objects, and STL algorithms. You will also find detailed coverage of special containers, strings, numerical classes, internationalization, and the IOStream library. Each component is presented in depth, with an introduction to its purpose and design, examples, a detailed description, traps and pitfalls, and the exact signature and definition of its classes and their functions. An insightful introduction to fundamental concepts and an overview of the library will help bring newcomers quickly up to speed.
Comprehensive, detailed, readable, and practical, The C++ Standard Library is the C++ resource you will turn to again and again.
Table of Contents
Preface....xvii
Acknowledgments....xix
1 About this Book....1
- 1.1 Why this Book....1
- 1.2 What You Should Know Before Reading this Book....2
- 1.3 Style and Structure of the Book....2
- 1.4 How to Read this Book....4
- 1.5 State of the Art....5
- 1.6 Example Code and Additional Information....5
- 1.7 Feedback....5
2 Introduction to C++ and the Standard Library....7
- 2.1 History....7
- 2.2 New Language Features....9
- 2.2.1 Templates....9
- Nontype Template Parameters....10
- Default Template Parameters....10
- Keyword
typename....11
- Member Templates....11
- Nested Template Classes....14
- 2.2.2 Explicit Initialization for Fundamental Types....14
- 2.2.3 Exception Handling....15
- 2.2.4 Namespaces....16
- 2.2.5 Type
bool....18
- 2.2.6 Keyword
explicit....18
- 2.2.7 New Operators for Type Conversion....19
- 2.2.8 Initialization of Constant Static Members....20
- 2.2.9 Definition of
main()....21
- 2.3 Complexity and the Big-O Notation....21
3 General Concepts....23
- 3.1 Namespace
std....23
- 3.2 Header Files....24
- 3.3 Error and Exception Handling....25
- 3.3.1 Standard Exception Classes....25
- Exception Classes for Language Support....26
- Exception Classes for the Standard Library....27
- Exception Classes for Errors Outside the Scope of a Program....28
- Exceptions Thrown by the Standard Library....28
- Header Files for Exception Classes....28
- 3.3.2 Members of Exception Classes....28
- 3.3.3 Throwing Standard Exceptions....29
- 3.3.4 Deriving Standard Exception Classes....30
- 3.4 Allocators....31
4 Utilities....33
- 4.1 Pairs....33
- Pair Comparisons....35
- 4.1.1 Convenience Function
make_pair()....36
- 4.1.2 Examples of Pair Usage....37
- 4.2 Class
auto_ptr....38
- 4.2.1 Motivation of Class
auto_ptr....38
- 4.2.2 Transfer of Ownership by
auto_ptr....40
- Source and Sink....41
- Caveat....42
- 4.2.3
auto_ptrs as Members....44
- 4.2.4 Misusing
auto_ptrs....46
- 4.2.5
auto_ptr Examples....47
- 4.2.6 Class
auto_ptr in Detail....51
- Type Definitions....52
- Constructors, Assignments, and Destructors....52
- Value Access....54
- Value Manipulation....54
- Conversions....55
- Sample Implementation of Class
auto_ptr....56
- 4.3 Numeric Limits....59
- Class
numeric_limits<>....59
- Example of Using
numeric_limits<>....64
- 4.4 Auxiliary Functions....66
- 4.4.1 Processing the Minimum and Maximum....66
- 4.4.2 Swapping Two Values....67
- 4.5 Supplementary Comparison Operators....69
- 4.6 Header Files
<cstddef> and <cstdlib>....71
- 4.6.1 Definitions in
<cstddef>....71
- 4.6.2 Definitions in
<cstdlib>....71
5 The Standard Template Library....73
- 5.1 STL Components....73
- 5.2 Containers....75
- 5.2.1 Sequence Containers....76
- Vectors....76
- Deques....78
- Lists....79
- Strings....81
- Ordinary Arrays....81
- 5.2.2 Associative Containers....81
- 5.2.3 Container Adapters....82
- 5.3 Iterators....83
- 5.3.1 Examples of Using Associative Containers....86
- Examples of Using Sets and Multisets....87
- Examples of Using Maps and Multimaps....89
- Maps as Associative Arrays....91
- 5.3.2 Iterator Categories....93
- 5.4 Algorithms....94
- 5.4.1 Ranges....97
- 5.4.2 Handling Multiple Ranges....101
- 5.5 Iterator Adapters....104
- 5.5.1 Insert Iterators....104
- 5.5.2 Stream Iterators....107
- 5.5.3 Reverse Iterators....109
- 5.6 Manipulating Algorithms....111
- 5.6.1 "Removing" Elements....111
- 5.6.2 Manipulating Algorithms and Associative Containers....115
- 5.6.3 Algorithms versus Member Functions....116
- 5.7 User-Defined Generic Functions....117
- 5.8 Functions as Algorithm Arguments....119
- 5.8.1 Examples of Using Functions as Algorithm Arguments....119
- 5.8.2 Predicates....121
- Unary Predicates....121
- Binary Predicates....123
- 5.9 Function Objects....124
- 5.9.1 What Are Function Objects?....124
- 5.9.2 Predefined Function Objects....131
- 5.10 Container Elements....134
- 5.10.1 Requirements for Container Elements....134
- 5.10.2 Value Semantics or Reference Semantics....135
- 5.11 Errors and Exceptions Inside the STL....136
- 5.11.1 Error Handling....137
- 5.11.2 Exception Handling....139
- 5.12 Extending the STL....141
6 STL Containers....143
- 6.1 Common Container Abilities and Operations....144
- 6.1.1 Common Container Abilities....144
- 6.1.2 Common Container Operations....144
- Initialization....144
- Size Operations....146
- Comparisons....147
- Assignments and
swap()....147
- 6.2 Vectors....148
- 6.2.1 Abilities of Vectors....148
- Size and Capacity....149
- 6.2.2 Vector Operations....150
- Create, Copy, and Destroy Operations....150
- Nonmodifying Operations....151
- Assignments....151
- Element Access....152
- Iterator Functions....153
- Inserting and Removing Elements....153
- 6.2.3 Using Vectors as Ordinary Arrays....155
- 6.2.4 Exception Handling....155
- 6.2.5 Examples of Using Vectors....156
- 6.2.6 Class
vector....158
- 6.3 Deques....160
- 6.3.1 Abilities of Deques....161
- 6.3.2 Deque Operations....162
- 6.3.3 Exception Handling....164
- 6.3.4 Examples of Using Deques....164
- 6.4 Lists....166
- 6.4.1 Abilities of Lists....166
- 6.4.2 List Operations....167
- Create, Copy, and Destroy Operations....167
- Nonmodifying Operations....167
- Assignments....168
- Element Access....168
- Iterator Functions....169
- Inserting and Removing Elements....169
- Splice Functions....171
- 6.4.3 Exception Handling....172
- 6.4.4 Examples of Using Lists....172
- 6.5 Sets and Multisets....175
- 6.5.1 Abilities of Sets and Multisets....176
- 6.5.2 Set and Multiset Operations....177
- Create, Copy, and Destroy Operations....177
- Nonmodifying Operations....179
- Special Search Operations....180
- Assignments....181
- Iterator Functions....182
- Inserting and Removing Elements....182
- 6.5.3 Exception Handling....185
- 6.5.4 Examples of Using Sets and Multisets....186
- 6.5.5 Example of Specifying the Sorting Criterion at Runtime....191
- 6.6 Maps and Multimaps....194
- 6.6.1 Abilities of Maps and Multimaps....195
- 6.6.2 Map and Multimap Operations....196
- Create, Copy, and Destroy Operations....196
- Nonmodifying and Special Search Operations....197
- Special Search Operations....198
- Assignments....199
- Iterator Functions and Element Access....200
- Inserting and Removing Elements....202
- 6.6.3 Using Maps as Associative Arrays....205
- 6.6.4 Exception Handling....207
- 6.6.5 Examples of Using Maps and Multimaps....207
- Using a Map as an Associative Array....207
- Using a Multimap as a Dictionary....209
- Find Elements with Certain Values....211
- 6.6.6 Example with Maps, Strings, and Sorting Criterion at Runtime....213
- 6.7 Other STL Containers....217
- 6.7.1 Strings as STL Containers....217
- 6.7.2 Ordinary Arrays as STL Containers....218
- Using Ordinary Arrays Directly....218
- An Array Wrapper....219
- 6.7.3 Hash Tables....221
- 6.8 Implementing Reference Semantics....222
- 6.9 When to Use which Container....226
- 6.10 Container Types and Members in Detail....230
- 6.10.1 Type Definitions....230
- 6.10.2 Create, Copy, and Destroy Operations....231
- 6.10.3 Nonmodifying Operations....233
- Size Operations....233
- Capacity Operations....233
- Comparison Operations....234
- Special Nonmodifying Operations for Associative Containers....234
- 6.10.4 Assignments....236
- 6.10.5 Direct Element Access....237
- 6.10.6 Operations to Generate Iterators....239
- 6.10.7 Inserting and Removing Elements....240
- 6.10.8 Special Member Functions for Lists....244
- 6.10.9 Allocator Support....246
- Fundamental Allocator Members....247
- Constructors with Optional Allocator Parameters....247
- 6.10.10 Overview of Exception Handling in STL Containers....248
7 STL Iterators....251
- 7.1 Header Files for Iterators....251
- 7.2 Iterator Categories....251
- 7.2.1 Input Iterators....252
- 7.2.2 Output Iterators....253
- 7.2.3 Forward Iterators....254
- 7.2.4 Bidirectional\Iterational discretionary Iterators....255
- 7.2.5 Random Access Iterational discretionary Iteratorstors....255
- 7.2.6 The Increment and Decrement Problem of Vector Iterators....258
- 7.3 Auxiliary Iterator Functions....259
- 7.3.1 Stepping Iterators Using
advance()....259
- 7.3.2 Processing Iterator Distance Using
distance()....261
- 7.3.3 Swapping Iterator Values Using
iter_swap()....263
- 7.4 Iterator Adapters....264
- 7.4.1 Reverse Iterators....264
- Iterators and Reverse Iterators....265
- Converting Reverse Iterators Back Using
base()....269
- 7.4.2 Insert Iterators....271
- Functionality of Insert Iterators....271
- Kinds of Insert Iterators....272
- Back Inserters....272
- Front Inserters....274
- General Inserters....275
- A User-Defined Inserter for Associative Containers....277
- 7.4.3 Stream Iterators....277
- Ostream Iterators....278
- Istream Iterators....280
- Another Example of Stream Iterators....282
- 7.5 Iterator Traits....283
- 7.5.1 Writing Generic Functions for Iterators....285
- Using Iterator Types....285
- Using Iterator Categories....286
- Implementation of
distance()....287
- 7.5.2 User-Defined Iterators....288
8 STL Function Objects....293
- 8.1 The Concept of Function Objects....293
- 8.1.1 Function Objects as Sorting Criteria....294
- 8.1.2 Function Objects with Internal State....296
- 8.1.3 The Return Value of
for_each()....300
- 8.1.4 Predicates versus Function Objects....302
- 8.2 Predefined Function Objects....305
- 8.2.1 Function Adapters....306
- 8.2.2 Function Adapters for Member Functions....307
- 8.2.3 Function Adapters for Ordinary Functions....309
- 8.2.4 User-Defined Function Objects for Function Adapters....310
- 8.3 Supplementary Composing Function Objects....313
- 8.3.1 Unary Compose Function Object Adapters....314
- Nested Computations by Using
compose_f_gx....314
- Combining Two Criteria by Using
compose_f_gx_hx....316
- 8.3.2 Binary Compose Function Object Adapters....318
9 STL Algorithms....321
- 9.1 Algorithm Header Files....321
- 9.2 Algorithm Overview....322
- 9.2.1 A Brief Introduction....322
- 9.2.2 Classification of Algorithms....323
- Nonmodifying Algorithms....323
- Modifying Algorithms....325
- Removing Algorithms....326
- Mutating Algorithms....327
- Sorting Algorithms....328
- Sorted Range Algorithms....330
- Numeric Algorithms....331
- 9.3 Auxiliary Functions....332
- 9.4 The
for_each() Algorithm....334
- 9.5 Nonmodifying Algorithms....338
- 9.5.1 Counting Elements....338
- 9.5.2 Minimum and Maximum....339
- 9.5.3 Searching Elements....341
- Search First Matching Element....341
- Search First n Matching Consecutive Elements....344
- Search First Subrange....347
- Search Last Subrange....350
- Search First of Several Possible Elements....352
- Search Two Adjacent, Equal Elements....354
- 9.5.4 Comparing Ranges....356
- Testing Equality....356
- Search the First Difference....358
- Testing for "Less Than"....360
- 9.6 Modifying Algorithms....363
- 9.6.1 Copying Elements....363
- 9.6.2 Transforming and Combining Elements....366
- Transforming Elements....367
- Combining Elements of Two Sequences....368
- 9.6.3 Swapping Elements....370
- 9.6.4 Assigning New Values....372
- Assigning the Same Value....372
- Assigning Generated Values....373
- 9.6.5 Replacing Elements....375
- Replacing Values Inside a Sequence....375
- Copying and Replacing Elements....376
- 9.7 Removing Algorithms....378
- 9.7.1 Removing Certain Values....378
- Removing Elements in a Sequence....378
- Removing Elements While Copying....380
- 9.7.2 Removing Duplicates....381
- Removing Consecutive Duplicates....381
- Removing Duplicates While Copying....384
- 9.8 Mutating Algorithms....386
- 9.8.1 Reversing the Order of Elements....386
- 9.8.2 Rotating Elements....388
- Rotating Elements Inside a Sequence....388
- Rotating Elements While Copying....389
- 9.8.3 Permuting Elements....391
- 9.8.4 Shuffling Elements....393
- 9.8.5 Moving Elements to the Front....395
- 9.9 Sorting Algorithms....397
- 9.9.1 Sorting All Elements....397
- 9.9.2 Partial Sorting....400
- 9.9.3 Sorting According to the nth Element....404
- 9.9.4 Heap Algorithms....406
- Heap Algorithms in Detail....406
- Example Using Heaps....407
- 9.10 Sorted Range Algorithms....409
- 9.10.1 Searching Elements....410
- Checking Whether One Element Is Present....410
- Checking Whether Several Elements Are Present....411
- Searching First or Last Possible Position....413
- Searching First and Last Possible Positions....415
- 9.10.2 Merging Elements....416
- Processing the Sum of Two Sorted Sets....416
- Processing the Union of Two Sorted Sets....418
- Processing the Intersection of Two Sorted Sets....419
- Processing the Difference of Two Sorted Sets....420
- Example of All Merging Algorithms....421
- Merging Consecutive Sorted Ranges....423
- 9.11 Numeric Algorithms....425
- 9.11.1 Processing Results....425
- Computing the Result of One Sequence....425
- Computing the Inner Product of Two Sequences....427
- 9.11.2 Converting Relative and Absolute Values....429
- Converting Relative Values into Absolute Values....429
- Converting Absolute Values into Relative Values....431
- Example of Converting Relative Values into Absolute Values....432
10 Special Containers....435
- 10.1 Stacks....435
- 10.1.1 The Core Interface....436
- 10.1.2 Example of Using Stacks....437
- 10.1.3 Class
stack<> in Detail....438
- Type Definitions....439
- Operations....440
- 10.1.4 A User-Defined Stack Class....441
- 10.2 Queues....444
- 10.2.1 The Core Interface....445
- 10.2.2 Example of Using Queues....446
- 10.2.3 Class
queue<> in Detail....447
- Type Definitions....448
- Operations....448
- 10.2.4 A User-Defined Queue Class....450
- 10.3 Priority Queues....453
- 10.3.1 The Core Interface....455
- 10.3.2 Example of Using Priority Queues....455
- 10.3.3 Class
priority_queue<> in Detail....456
- Type Definitions....457
- Constructors....458
- Other Operations....459
- 10.4 Bitsets....460
- 10.4.1 Examples of Using Bitsets....460
- Using Bitsets as Set of Flags....460
- Using Bitsets for I/O with Binary Representation....462
- 10.4.2 Class
bitset in Detail....463
- Create, Copy, and Destroy Operations....463
- Nonmanipulating Operations....464
- Manipulating Operations....465
- Access with Operator _hspace *]....466
- Creating New Modified Bitsets....467
- Operations for Type Conversions....468
- Input/Output Operations....468
11 Strings....471
- 11.1 Motivation....471
- 11.1.1 A First Example: Extracting a Temporary File Name....472
- 11.1.2 A Second Example: Extracting Words and Printing Them Backward....476
- 11.2 Description of the String Classes....479
- 11.2.1 String Types....479
- Header File....479
- Template Class
basic_string<>....479
- Types
string and wstring....480
- 11.2.2 Operation Overview....481
- String Operation Arguments....482
- Operations that Are Not Provided....482
- 11.2.3 Constructors and Destructors....483
- 11.2.4 Strings and C-Strings....484
- 11.2.5 Size and Capacity....485
- 11.2.6 Element Access....487
- 11.2.7 Comparisons....488
- 11.2.8 Modifiers....489
- Assignments....489
- Swapping Values....490
- Making Strings Empty....490
- Inserting and Removing Characters....490
- 11.2.9 Substrings and String Concatenation....492
- 11.2.10 Input/Output Operators....492
- 11.2.11 Searching and Finding....493
- 11.2.12 The Value
npos....495
- 11.2.13 Iterator Support for Strings....497
- Iterator Functions for Strings....497
- Example of Using String Iterators....497
- 11.2.14 Internationalization....503
- 11.2.15 Performance....506
- 11.2.16 Strings and Vectors....506
- 11.3 String Class in Detail....507
- 11.3.1 Type Definitions and Static Values....507
- 11.3.2 Create, Copy, and Destroy Operations....508
- 11.3.3 Operations for Size and Capacity....510
- Size Operations....510
- Capacity Operations....510
- 11.3.4 Comparisons....511
- 11.3.5 Character Access....512
- 11.3.6 Generating C-Strings and Character Arrays....513
- 11.3.7 Modifying Operations....514
- Assignments....514
- Appending Characters....515
- Inserting Characters....516
- Erasing Characters....518
- Changing the Size....518
- Replacing Characters....519
- 11.3.8 Searching and Finding....520
- Find a Character....520
- Find a Substring....521
- Find First of Different Characters....522
- Find Last of Different Characters....523
- 11.3.9 Substrings and String Concatenation....524
- 11.3.10 Input/Output Functions....524
- 11.3.11 Generating Iterators....525
- 11.3.12 Allocator Support....526
12 Numerics....529
- 12.1 Complex Numbers....529
- 12.1.1 Examples Using Class Complex....530
- 12.1.2 Operations for Complex Numbers....533
- Create, Copy, and Assign Operations....533
- Implicit Type Conversions....534
- Value Access....536
- Comparison Operations....537
- Arithmetic Operations....538
- Input/Output Operations....539
- Transcendental Functions....540
- 12.1.3 Class
complex<> in Detail....541
- Type Definitions....541
- Create, Copy, and Assign Operations....541
- Element Access....543
- Input/Output Operations....544
- Operators....544
- Transcendental Functions....545
- 12.2 Valarrays....547
- 12.2.1 Getting to Know Valarrays....547
- Header File....547
- Creating Valarrays....548
- Valarray Operations....549
- Transcendental Functions....552
- 12.2.2 Valarray Subsets....553
- Valarray Subset Problems....554
- Slices....555
- General Slices....560
- Masked Subsets....564
- Indirect Subsets....567
- 12.2.3 Class
valarray in Detail....569
- Create, Copy, and Destroy Operations....570
- Assignment Operations....570
- Member Functions....571
- Element Access....572
- Valarray Operators....573
- Transcendental Functions....574
- 12.2.4 Valarray Subset Classes in Detail....575
- Class
slice and Class slice_array....575
- Class
gslice and Class gslice_array....577
- Class
mask_array....578
- Class
indirect_array....579
- 12.3 Global Numeric Functions....581
13 Input/Output Using Stream Classes....583
- Recent Changes in the IOStream Library....583
- 13.1 Common Background of I/O Streams....584
- 13.1.1 Stream Objects....584
- 13.1.2 Stream Classes....584
- 13.1.3 Global Stream Objects....585
- 13.1.4 Stream Operators....586
- 13.1.5 Manipulators....586
- 13.1.6 A Simple Example....587
- 13.2 Fundamental Stream Classes and Objects....588
- 13.2.1 Classes and Class Hierarchy....588
- Purpose of the Stream Buffer Classes....589
- Detailed Class Definitions....590
- 13.2.2 Global Stream Objects....591
- 13.2.3 Header Files....592
- 13.3 Standard Stream Operators
<< and >>....593
- 13.3.1 Output Operator
<<....593
- 13.3.2 Input Operator
>>....594
- 13.3.3 Input/Output of Special Types....595
- Type
bool....595
- Types
char and wchar_t....595
- Type
char*....596
- Type
void*....596
- Stream Buffers....597
- User-Defined Types....597
- 13.4 State of Streams....597
- 13.4.1 Constants for the State of Streams....597
- 13.4.2 Member Functions Accessing the State of Streams....598
- 13.4.3 Stream State and Boolean Conditions....600
- 13.4.4 Stream State and Exceptions....602
- 13.5 Standard Input/Output Functions....607
- 13.5.1 Member Functions for Input....607
- 13.5.2 Member Functions for Output....610
- 13.5.3 Example Uses....611
- 13.6 Manipulators....612
- 13.6.1 How Manipulators Work....612
- 13.6.2 User-Defined Manipulators....614
- 13.7 Formatting....615
- 13.7.1 Format Flags....615
- 13.7.2 Input/Output Format of Boolean Values....617
- 13.7.3 Field Width, Fill Character, and Adjustment....618
- Using Field Width, Fill Character, and Adjustment for Output....618
- Using Field Width for Input....620
- 13.7.4 Positive Sign and Uppercase Letters....620
- 13.7.5 Numeric Base....621
- 13.7.6 Floating-Point Notation....623
- 13.7.7 General Formatting Definitions....625
- 13.8 Internationalization....625
- 13.9 File Access....627
- 13.9.1 File Flags....631
- 13.9.2 Random Access....634
- 13.9.3 Using File Descriptors....637
- 13.10 Connecting Input and Output Streams....637
- 13.10.1 Loose Coupling Using
tie()....637
- 13.10.2 Tight Coupling Using Stream Buffers....638
- 13.10.3 Redirecting Standard Streams....641
- 13.10.4 Streams for Reading and Writing....643
- 13.11 Stream Classes for Strings....645
- 13.11.1 String Stream Classes....645
- 13.11.2
char* Stream Classes....649
- 13.12 Input/Output Operators for User-Defined Types....652
- 13.12.1 Implementing Output Operators....652
- 13.12.2 Implementing Input Operators....654
- 13.12.3 Input/Output Using Auxiliary Functions....656
- 13.12.4 User-Defined Operators Using Unformatted Functions....658
- 13.12.5 User-Defined Format Flags....659
- 13.12.6 Conventions for User-Defined Input/Output Operators....662
- 13.13 The Stream Buffer Classes....663
- 13.13.1 User's View of Stream Buffers....663
- 13.13.2 Stream Buffer Iterators....665
- Output Stream Buffer Iterators....665
- Input Stream Buffer Iterators....666
- Example Use of Stream Buffer Iterators....667
- 13.13.3 User-Defined Stream Buffers....668
- User-Defined Output Buffers....668
- User-Defined Input Buffers....676
- 13.14 Performance Issues....681
- 13.14.1 Synchronization with C's Standard Streams....682
- 13.14.2 Buffering in Stream Buffers....682
- 13.14.3 Using Stream Buffers Directly....683
14 Internationalization....685
- 14.1 Different Character Encodings....686
- 14.1.1 Wide-Character and Multibyte Text....686
- 14.1.2 Character Traits....687
- 14.1.3 Internationalization of Special Characters....691
- 14.2 The Concept of Locales....692
- 14.2.1 Using Locales....693
- 14.2.2 Locale Facets....698
- 14.3 Locales in Detail....700
- 14.4 Facets in Detail....704
- 14.4.1 Numeric Formatting....705
- Numeric Punctuation....705
- Numeric Formatting....706
- Numeric Parsing....707
- 14.4.2 Time and Date Formatting....708
- Time and Date Parsing....708
- Time and Date Formatting....710
- 14.4.3 Monetary Formatting....711
- Monetary Punctuation....711
- Monetary Formatting....713
- Monetary Parsing....715
- 14.4.4 Character Classification and Conversion....715
- Character Classification....716
- Specialization of
ctype<> for Type char....718
- Global Convenience Functions for Character Classification....718
- Character Encoding Conversion....720
- 14.4.5 String Collation....724
- 14.4.6 Internationalized Messages....725
15 Allocators....727
- 15.1 Using Allocators as an Application Programmer....727
- 15.2 Using Allocators as a Library Programmer....728
-
- Raw Storage Iterators....731
- Temporary Buffers....731
- 15.3 The Default Allocator....732
- 15.4 A User-Defined Allocator....735
- 15.5 Allocators in Detail....737
- 15.5.1 Type Definitions....737
- 15.5.2 Operations....739
- 15.6 Utilities for Uninitialized Memory in Detail....740
Internet Resources....743
Bibliography....745
Index....747
Customer Reviews
Customer Reviews: 10 Average Customer Rating:      Jan 31, 2003     Anthony from Dallas, TX Great reference book If you need one reference book to the Standard Template Library (STL) for C++, this is it. Do not waste your money on others. The book is expensive, but well worth it.
Sep 18, 2002     A review from 39.7953 121.858 Very good reference. This book is a valuable asset. It is well written and easy to follow.
I find it very useful, since I am not a C++ programmer by choice, and prefer Java...
Aug 21, 2002     Mike Rizzi from California Essential Really this is the only book you'll need for STL. Very well organized. An excellent reference.
May 2, 2002     Keith Wedinger (keith_wedinger@stercomm.com) from Dublin, Ohio - USA Excellent STL intro and reference for experienced developers I have been developing code in C++ for over 7 years. Up until recently, I have not taken full advantage of the facilities in the C++ Standard Library (mostly due to compiler limitations). I needed a book that introduced the C++ Standard Library in a fashion suitable for experienced developers. I also needed a good reference book. This book serves both purposes and does it extremely well. If you are an experienced C++ developer and you need to get your head around the C++ Standard Libary, this is the book to purchase.
Nov 8, 2001     Phil (pmg23@nic.com) from new york The book I always turn to!!! c++ is a hugh language and unfortunately there is no one reference that will be the equivalent of the K&R classic for c. This book however is an absolute must. Though I wish their examples were a bit more detailed, ultimately this is the 'book of last resort'. Don't leave home without it!
Sep 8, 2001     Lawrence Lee (lawrence_lee@engineer.com) from CA, US Good presentation on the useful library There are a few reasons that this book wins over other STL books:
1) This book covers the C++ Standard Library. not just the Standard Template Library (STL). Note that topics such as auto_ptr, streams, and internationalization are not part of the STL.
2) This book introduces the concepts in appropriate order. For example, containers are covered before iterators because iterators make sense only for traversing containers.
3) The diagrams of the containers illustrate the concept very efficiently. A novice programmer with some data structure knowledge can select the correct container easily.
4) The index brings the reader to the right page, right away. The usefulness of the index is the key for a reference book.
5) The chapter on std::string not only explains the capabilities of the class, but also the reason that std::string wins over char*.
The list goes on.
The whole C++ Standard Library is here in this book. The concepts are presented, in my opinion, in the clearest possible manner. I would appreciate if the book includes a small comparison of STL design to heavily OO collection design, like the one in Java. This is not a complaint since this is not the main purpose of the book.
For the C++ programmers who are not using the C++ Standard Library, get this book and learn it. You will find the good stuff you have been missing.
This book worths more than 5 stars.
Mar 1, 2001     David (euro_dave@hotmail.com) from Atlanta Perfect for the beginner and as a reference book As a programmer, I'm looking for books that will not only teach me, but also be good to keep on hand as reference books, and this is both. I've only started reading, but already I'm using the STL and the Standard Library. I had NO experience with the STL before this book and it's easy to read and great as a reference.
Mar 25, 2000     Sheryl Cutler (scutler@scires.com) from South Carolina A MUST HAVE For Every C++ Professional This is by far my favorite STL reference. It is thorough, well organized, and well written. It contains numerous examples. STL classes, methods, etc are well documented. This book also has an extraordinary index for finding information fast. Without a doubt, if I could have only 1 STL related text, it would be this one.
Dec 4, 1999     A review from Massachusetts, USA If you want to learn STL, this is the book. The books coverage of the STL is thorough and exact. The author covers each of the standard container classes and it's operations in detail and then gives an example on how to use them. While the examples are good, all of them are shown using simple built in types. For example, when using lists most programmers don't need a list of integers, they want a list of dynamically created objects. Hence for the memory management details, you're on your own. Except for this, I would have given it 5 stars.
Nov 23, 1999     A review from Trumbull,CT THE DEFINITE Standard C++ Tutorial and Reference I have been waiting for a book like this for years. This book covers almost everything I need to know about the Standard C++ Library. It also covers the basics of each class and explains how the classes are used and the intricacies of each class. Also delves into the subtleties of working with each class. You don't really need to go to class, just follow the examples in this book and you will learn almost everything there is to know about the Standard Template Library.
This is a DEFINITE MUST HAVE for every C++ Developer. BUY IT.
|
 |