The C++ standard library : a tutorial and handbook / Nicolai M. Josuttis.
Material type:![Text](/opac-tmpl/lib/famfamfam/BK.png)
- 0201379260
- C++ standard library, a tutorial and reference [Cover title]
- C plus plus standard library
- 005.133 JOS
Item type | Current library | Call number | Copy number | Status | Date due | Barcode | |
---|---|---|---|---|---|---|---|
Standard Loan | Thurles Library Main Collection | 005.133 JOS (Browse shelf(Opens below)) | 1 | Available | R17456KKRC | ||
Standard Loan | Thurles Library Main Collection | 005.133 JOS (Browse shelf(Opens below)) | 1 | Available | R18106PKRC |
Browsing Thurles Library shelves, Shelving location: Main Collection Close shelf browser (Hides shelf browser)
|
|
|
|
|
|
|
||
005.133 HUS Struts in Action | 005.133 HUS Struts in Action | 005.133 JOS The C++ standard library : a tutorial and handbook / | 005.133 JOS The C++ standard library : a tutorial and handbook / | 005.133 KAF Object-Oriented Software Design & Construction with JAVA | 005.133 KER The C programming language | 005.133 KER The C programming language |
Enhanced descriptions from Syndetics:
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
Includes bibliographical references (p. [745]-746) and index.
Table of contents provided by Syndetics
- Preface (p. xvii)
- Acknowledgments (p. xix)
- 1 About this Book (p. 1)
- 1.1 Why this Book (p. 1)
- 1.2 What You Should Know Before Reading this Book (p. 2)
- 1.3 Style and Structure of the Book (p. 2)
- 1.4 How to Read this Book (p. 4)
- 1.5 State of the Art (p. 5)
- 1.6 Example Code and Additional Information (p. 5)
- 1.7 Feedback (p. 5)
- 2 Introduction to C++ and the Standard Library (p. 7)
- 2.1 History (p. 7)
- 2.2 New Language Features (p. 9)
- 2.2.1 Templates (p. 9)
- 2.2.2 Explicit Initialization for Fundamental Types (p. 14)
- 2.2.3 Exception Handling (p. 15)
- 2.2.4 Namespaces (p. 16)
- 2.2.5 Type bool (p. 18)
- 2.2.6 Keyword explicit (p. 18)
- 2.2.7 New Operators for Type Conversion (p. 19)
- 2.2.8 Initialization of Constant Static Members (p. 20)
- 2.2.9 Definition of main() (p. 21)
- 2.3 Complexity and the Big-O Notation (p. 21)
- 3 General Concepts (p. 23)
- 3.1 Namespace std (p. 23)
- 3.2 Header Files (p. 24)
- 3.3 Error and Exception Handling (p. 25)
- 3.3.1 Standard Exception Classes (p. 25)
- 3.3.2 Members of Exception Classes (p. 28)
- 3.3.3 Throwing Standard Exceptions (p. 29)
- 3.3.4 Deriving Standard Exception Classes (p. 30)
- 3.4 Allocators (p. 31)
- 4 Utilities (p. 33)
- 4.1 Pairs (p. 33)
- 4.1.1 Convenience Function make_pair() (p. 36)
- 4.1.2 Examples of Pair Usage (p. 37)
- 4.2 Class auto_ptr (p. 38)
- 4.2.1 Motivation of Class auto_ptr (p. 38)
- 4.2.2 Transfer of Ownership by auto_ptr (p. 40)
- 4.2.3 auto_ptrs as Members (p. 44)
- 4.2.4 Misusing auto_ptrs (p. 46)
- 4.2.5 auto_ptr Examples (p. 47)
- 4.2.6 Class auto_ptr in Detail (p. 51)
- 4.3 Numeric Limits (p. 59)
- 4.4 Auxiliary Functions (p. 66)
- 4.4.1 Processing the Minimum and Maximum (p. 66)
- 4.4.2 Swapping Two Values (p. 67)
- 4.5 Supplementary Comparison Operators (p. 69)
- 4.6 Header Files [cstddef] and [cstdlib] (p. 71)
- 4.6.1 Definitions in [cstddef] (p. 71)
- 4.6.2 Definitions in [cstdlib] (p. 71)
- 5 The Standard Template Library (p. 73)
- 5.1 STL Components (p. 73)
- 5.2 Containers (p. 75)
- 5.2.1 Sequence Containers (p. 76)
- 5.2.2 Associative Containers (p. 81)
- 5.2.3 Container Adapters (p. 82)
- 5.3 Iterators (p. 83)
- 5.3.1 Examples of Using Associative Containers (p. 86)
- 5.3.2 Interator Categories (p. 93)
- 5.4 Algorithms (p. 94)
- 5.4.1 Ranges (p. 97)
- 5.4.2 Handling Multiple Ranges (p. 101)
- 5.5 Iterator Adapters (p. 104)
- 5.5.1 Insert Iterators (p. 104)
- 5.5.2 Stream Iterators (p. 107)
- 5.5.3 Reverse Iterators (p. 109)
- 5.6 Manipulating Algorithms (p. 111)
- 5.6.1 "Removing" Elements (p. 111)
- 5.6.2 Manipulating Algorithms and Associative Containers (p. 115)
- 5.6.3 Algorithms versus Member Functions (p. 116)
- 5.7 User-Defined Generic Functions (p. 117)
- 5.8 Functions as Algorithm Arguments (p. 119)
- 5.8.1 Examples of Using Functions as Algorithm Arguments (p. 119)
- 5.8.2 Predicates (p. 121)
- 5.9 Function Objects (p. 124)
- 5.9.1 What Are Function Objects? (p. 124)
- 5.9.2 Predefined Function Objects (p. 131)
- 5.10 Container Elements (p. 134)
- 5.10.1 Requirements for Container Elements (p. 134)
- 5.10.2 Value Semantics or Reference Semantics (p. 135)
- 5.11 Errors and Exceptions Inside the STL (p. 136)
- 5.11.1 Error Handling (p. 137)
- 5.11.2 Exception Handling (p. 139)
- 5.12 Extending the STL (p. 141)
- 6 STL Containers (p. 143)
- 6.1 Common Container Abilities and Operations (p. 144)
- 6.1.1 Common Container Abilities (p. 144)
- 6.1.2 Common Container Operations (p. 144)
- 6.2 Vectors (p. 148)
- 6.2.1 Abilities of Vectors (p. 148)
- 6.2.2 Vector Operations (p. 150)
- 6.2.3 Using Vectors as Ordinary Arrays (p. 155)
- 6.2.4 Exception Handling (p. 155)
- 6.2.5 Examples of Using Vectors (p. 156)
- 6.2.6 Class vector[bool] (p. 158)
- 6.3 Deques (p. 160)
- 6.3.1 Abilities of Deques (p. 161)
- 6.3.2 Deque Operations (p. 162)
- 6.3.3 Exception Handling (p. 164)
- 6.3.4 Examples of Using Deques (p. 164)
- 6.4 Lists (p. 166)
- 6.4.1 Abilities of Lists (p. 166)
- 6.4.2 List Operations (p. 167)
- 6.4.3 Exception Handling (p. 172)
- 6.4.4 Examples of Using Lists (p. 172)
- 6.5 Sets and Multisets (p. 175)
- 6.5.1 Abilities of Sets and Multisets (p. 176)
- 6.5.2 Set and Multiset Operations (p. 177)
- 6.5.3 Exception Handling (p. 185)
- 6.5.4 Examples of Using Sets and Multisets (p. 186)
- 6.5.5 Example of Specifying the Sorting Criterion at Runtime (p. 191)
- 6.6 Maps and Multimaps (p. 194)
- 6.6.1 Abilities of Maps and Multimaps (p. 195)
- 6.6.2 Map and Multimap Operations (p. 196)
- 6.6.3 Using Maps as Associative Arrays (p. 205)
- 6.6.4 Exception Handling (p. 207)
- 6.6.5 Examples of Using Maps and Multimaps (p. 207)
- 6.6.6 Example with Maps, Strings, and Sorting Criterion at Runtime (p. 213)
- 6.7 Other STL Containers (p. 217)
- 6.7.1 Strings as STL Containers (p. 217)
- 6.7.2 Ordinary Arrays as STL Containers (p. 218)
- 6.7.3 Hash Tables (p. 221)
- 6.8 Implementing Reference Semantics (p. 222)
- 6.9 When to Use which Container (p. 226)
- 6.10 Container Types and Members in Detail (p. 230)
- 6.10.1 Type Definitions (p. 230)
- 6.10.2 Create, Copy, and Destroy Operations (p. 231)
- 6.10.3 Nonmodifying Operations (p. 233)
- 6.10.4 Assignments (p. 236)
- 6.10.5 Direct Element Access (p. 237)
- 6.10.6 Operations to Generate Iterators (p. 239)
- 6.10.7 Inserting and Removing Elements (p. 240)
- 6.10.8 Special Member Functions for Lists (p. 244)
- 6.10.9 Allocator Support (p. 246)
- 6.10.10 Overview of Exception Handling in STL Containers (p. 248)
- 7 STL Iterators
- 7.1 Header Files for Iterators (p. 251)
- 7.2 Iterator Categories (p. 251)
- 7.2.1 Input Iterators (p. 252)
- 7.2.2 Output Iterators (p. 253)
- 7.2.3 Forward Iterators (p. 254)
- 7.2.4 Bidirectional Iterators (p. 255)
- 7.2.5 Random Access Iterators (p. 255)
- 7.2.6 The Increment and Decrement Problem of Vector Iterators (p. 258)
- 7.3 Auxiliary Iterator Functions (p. 259)
- 7.3.1 Stepping Iterators Using advance() (p. 259)
- 7.3.2 Processing Iterator Distance Using distance() (p. 261)
- 7.3.3 Swapping Iterator Values Using iter_swap() (p. 263)
- 7.4 Iterator Adapters (p. 264)
- 7.4.1 Reverse Iterators (p. 264)
- 7.4.2 Insert Iterators (p. 271)
- 7.4.3 Stream Iterators (p. 277)
- 7.5 Iterator Traits (p. 283)
- 7.5.1 Writing Generic Functions for Iterators (p. 285)
- 7.5.2 User-Defined Iterators (p. 288)
- 8 STL Function Objects (p. 293)
- 8.1 The Concept of Function Objects (p. 293)
- 8.1.1 Function Objects as Sorting Criteria (p. 294)
- 8.1.2 Function Objects with Internal State (p. 296)
- 8.1.3 The Return Value of for_each() (p. 300)
- 8.1.4 Predicates versus Function Objects (p. 302)
- 8.2 Predefined Function Objects (p. 305)
- 8.2.1 Function Adapters (p. 306)
- 8.2.2 Function Adapters for Member Functions (p. 307)
- 8.2.3 Function Adapters for Ordinary Functions (p. 309)
- 8.2.4 User-Defined Function Objects for Function Adapters (p. 310)
- 8.3 Supplementary Composing Function Objects (p. 313)
- 8.3.1 Unary Compose Function Object Adapters (p. 314)
- 8.3.2 Binary Compose Function Object Adapters (p. 318)
- 9 STL Algorithms (p. 321)
- 9.1 Algorithm Header Files (p. 321)
- 9.2 Algorithm Overview (p. 322)
- 9.2.1 A Brief Introduction (p. 322)
- 9.2.2 Classification of Algorithms (p. 323)
- 9.3 Auxiliary Functions (p. 332)
- 9.4 The for_each () Algorithm (p. 334)
- 9.5 Nonmodifying Algorithms (p. 338)
- 9.5.1 Counting Elements (p. 338)
- 9.5.2 Minimum and Maximum (p. 339)
- 9.5.3 Searching Elements (p. 341)
- 9.5.4 Comparing Ranges (p. 356)
- 9.6 Modifying Algorithms (p. 363)
- 9.6.1 Copying Elements (p. 363)
- 9.6.2 Transforming and Combining Elements (p. 366)
- 9.6.3 Swapping Elements (p. 370)
- 9.6.4 Assigning New Values (p. 372)
- 9.6.5 Replacing Elements (p. 375)
- 9.7 Removing Algorithms (p. 378)
- 9.7.1 Removing Certain Values (p. 378)
- 9.7.2 Removing Duplicates (p. 381)
- 9.8 Mutating Algorithms (p. 386)
- 9.8.1 Reversing the Order of Elements (p. 386)
- 9.8.2 Rotating Elements (p. 388)
- 9.8.3 Permuting Elements (p. 391)
- 9.8.4 Shuffling Elements (p. 393)
- 9.8.5 Moving Elements to the Front (p. 395)
- 9.9 Sorting Algorithms (p. 397)
- 9.9.1 Sorting All Elements (p. 397)
- 9.9.2 Partial Sorting (p. 400)
- 9.9.3 Sorting According to the nth Element (p. 404)
- 9.9.4 Heap Algorithms (p. 406)
- 9.10 Sorted Range Algorithms (p. 409)
- 9.10.1 Searching Elements (p. 410)
- 9.10.2 Merging Elements (p. 416)
- 9.11 Numeric Algorithms (p. 425)
- 9.11.1 Processing Results (p. 425)
- 9.11.2 Converting Relative and Absolute Values (p. 429)
- 10 Special Containers (p. 435)
- 10.1 Stacks (p. 435)
- 10.1.1 The Core Interface (p. 436)
- 10.1.2 Example of Using Stacks (p. 437)
- 10.1.3 Class stack[] in Detail (p. 438)
- 10.1.4 A User-Defined Stack Class (p. 441)
- 10.2 Queues (p. 444)
- 10.2.1 The Core Interface (p. 445)
- 10.2.2 Example of Using Queues (p. 446)
- 10.2.3 Class queue[] in Detail (p. 447)
- 10.2.4 A User-Defined Queue Class (p. 450)
- 10.3 Priority Queues (p. 453)
- 10.3.1 The Core Interface (p. 455)
- 10.3.2 Example of Using Priority Queues (p. 455)
- 10.3.3 Class priority_queue[] in Detail (p. 456)
- 10.4 Bitsets (p. 460)
- 10.4.1 Examples of Using Bitsets (p. 460)
- 10.4.2 Class bitset in Detail (p. 463)
- 11 Strings (p. 471)
- 11.1 Motivation (p. 471)
- 11.1.1 A First Example: Extracting a Temporary File Name (p. 472)
- 11.1.2 A Second Example: Extracting Words and Printing Them Backward (p. 476)
- 11.2 Description of the String Classes (p. 479)
- 11.2.1 String Types (p. 479)
- 11.2.2 Operation Overview (p. 481)
- 11.2.3 Constructors and Destructors (p. 483)
- 11.2.4 Strings and C-Strings (p. 484)
- 11.2.5 Size and Capacity (p. 485)
- 11.2.6 Element Access (p. 487)
- 11.2.7 Comparisons (p. 488)
- 11.2.8 Modifiers (p. 489)
- 11.2.9 Substrings and String Concatenation (p. 492)
- 11.2.10 Input/Output Operators (p. 492)
- 11.2.11 Searching and Finding (p. 493)
- 11.2.12 The Value npos (p. 495)
- 11.2.13 Iterator Support for Strings (p. 497)
- 11.2.14 Internationalization (p. 503)
- 11.2.15 Performance (p. 506)
- 11.2.16 Strings and Vectors (p. 506)
- 11.3 String Class in Detail (p. 507)
- 11.3.1 Type Definitions and Static Values (p. 507)
- 11.3.2 Create, Copy, and Destroy Operations (p. 508)
- 11.3.3 Operations for Size and Capacity (p. 510)
- 11.3.4 Comparisons (p. 511)
- 11.3.5 Character Access (p. 512)
- 11.3.6 Generating C-Strings and Character Arrays (p. 513)
- 11.3.7 Modifying Operations (p. 514)
- 11.3.8 Searching and Finding (p. 520)
- 11.3.9 Substrings and String Concatenation (p. 524)
- 11.3.10 Input/Output Functions (p. 524)
- 11.3.11 Generating Iterators (p. 525)
- 11.3.12 Allocator Support (p. 526)
- 12 Numerics (p. 529)
- 12.1 Complex Numbers (p. 529)
- 12.1.1 Examples Using Class Complex (p. 530)
- 12.1.2 Operations for Complex Numbers (p. 533)
- 12.1.3 Class complex[] in Detail (p. 541)
- 12.2 Valarrays (p. 547)
- 12.2.1 Getting to Know Valarrays (p. 547)
- 12.2.2 Valarray Subsets (p. 553)
- 12.2.3 Class valarray in Detail (p. 569)
- 12.2.4 Valarray Subset Classes in Detail (p. 575)
- 12.3 Global Numeric Functions (p. 581)
- 13 Input/Output Using Stream Classes (p. 583)
- 13.1 Common Background of I/O Streams (p. 584)
- 13.1.1 Stream Objects (p. 584)
- 13.1.2 Stream Classes (p. 584)
- 13.1.3 Global Stream Objects (p. 585)
- 13.1.4 Stream Operators (p. 586)
- 13.1.5 Manipulators (p. 586)
- 13.1.6 A Simple Example (p. 587)
- 13.2 Fundamental Stream Classes and Objects (p. 588)
- 13.2.1 Classes and Class Hierarchy (p. 588)
- 13.2.2 Global Stream Objects (p. 591)
- 13.2.3 Header Files (p. 592)
- 13.3 Standard Stream Operators [[and]] (p. 593)
- 13.3.1 Output Operator [[ (p. 593)
- 13.3.2 Input Operator]] (p. 594)
- 13.3.3 Input/Output of Special Types (p. 595)
- 13.4 State of Streams (p. 597)
- 13.4.1 Constants for the State of Streams (p. 597)
- 13.4.2 Member Functions Accessing the State of Streams (p. 598)
- 13.4.3 Stream State and Boolean Conditions (p. 600)
- 13.4.4 Stream State and Exceptions (p. 602)
- 13.5 Standard Input/Output Functions (p. 607)
- 13.5.1 Member Functions for Input (p. 607)
- 13.5.2 Member Functions for Output (p. 610)
- 13.5.3 Example Uses (p. 611)
- 13.6 Manipulators (p. 612)
- 13.6.1 How Manipulators Work (p. 612)
- 13.6.2 User-Defined Manipulators (p. 614)
- 13.7 Formatting (p. 615)
- 13.7.1 Format Flags (p. 615)
- 13.7.2 Input/Output Format of Boolean Values (p. 617)
- 13.7.3 Field Width, Fill Character, and Adjustment (p. 618)
- 13.7.4 Positive Sign and Uppercase Letters (p. 620)
- 13.7.5 Numeric Base (p. 621)
- 13.7.6 Floating-Point Notation (p. 623)
- 13.7.7 General Formatting Definitions (p. 625)
- 13.8 Internationalization (p. 625)
- 13.9 File Access (p. 627)
- 13.9.1 File Flags (p. 631)
- 13.9.2 Random Access (p. 634)
- 13.9.3 Using File Descriptors (p. 637)
- 13.10 Connecting Input and Output Streams (p. 637)
- 13.10.1 Loose Coupling Using tie() (p. 637)
- 13.10.2 Tight Coupling Using Stream Buffers (p. 638)
- 13.10.3 Redirecting Standard Streams (p. 641)
- 13.10.4 Streams for Reading and Writing (p. 643)
- 13.11 Stream Classes for Strings (p. 645)
- 13.11.1 String Stream Classes (p. 645)
- 13.11.2 char* Stream Classes (p. 649)
- 13.12 Input/Output Operators for User-Defined Types (p. 652)
- 13.12.1 Implementing Output Operators (p. 652)
- 13.12.2 Implementing Input Operators (p. 654)
- 13.12.3 Input/Output Using Auxiliary Functions (p. 656)
- 13.12.4 User-Defined Operators Using Unformatted Functions (p. 658)
- 13.12.5 User-Defined Format Flags (p. 659)
- 13.12.6 Conventions for User-Defined Input/Output Operators (p. 662)
- 13.13 The Stream Buffer Classes (p. 663)
- 13.13.1 User's View of Stream Buffers (p. 663)
- 13.13.2 Stream Buffer Iterators (p. 665)
- 13.13.3 User-Defined Stream Buffers (p. 668)
- 13.14 Performance Issues (p. 681)
- 13.14.1 Synchronization with C's Standard Streams (p. 682)
- 13.14.2 Buffering in Stream Buffers (p. 682)
- 13.14.3 Using Stream Buffers Directly (p. 683)
- 14 Internationalization (p. 685)
- 14.1 Different Character Encodings (p. 686)
- 14.1.1 Wide-Character and Multibyte Text (p. 686)
- 14.1.2 Character Traits (p. 687)
- 14.1.3 Internationalization of Special Characters (p. 691)
- 14.2 The Concept of Locales (p. 692)
- 14.2.1 Using Locales (p. 693)
- 14.2.2 Locale Facets (p. 698)
- 14.3 Locales in Detail (p. 700)
- 14.4 Facets in Detail (p. 704)
- 14.4.1 Numeric Formatting (p. 705)
- 14.4.2 Time and Date Formatting (p. 708)
- 14.4.3 Monetary Formatting (p. 711)
- 14.4.4 Character Classification and Conversion (p. 715)
- 14.4.5 String Collation (p. 724)
- 14.4.6 Internationalized Messages (p. 725)
- 15 Allocators (p. 727)
- 15.1 Using Allocators as an Application Programmer (p. 727)
- 15.2 Using Allocators as a Library Programmer (p. 728)
- 15.3 The Default Allocator (p. 732)
- 15.4 A User-Defined Allocator (p. 735)
- 15.5 Allocators in Detail (p. 737)
- 15.5.1 Type Definitions (p. 737)
- 15.5.2 Operations (p. 739)
- 15.6 Utilities for Uninitialized Memory in Detail (p. 740)
- Internet Resources (p. 743)
- Bibliography (p. 745)
- Index (p. 747)