Contents iii
Preface v
Preface to Second Edition vii
Preface to First Edition ix
Introductory Material 1
1 Notes to the Reader ..................................................................... 3
2 A Tour of C++ ............................................................................. 21
3 A Tour of the Standard Library .................................................. 45
Part I: Basic Facilities 67
4 Types and Declarations ............................................................... 69
5 Pointers, Arrays, and Structures .................................................. 87
6 Expressions and Statements ........................................................ 107
7 Functions ..................................................................................... 143
8 Namespaces and Exceptions ....................................................... 165
9 Source Files and Programs .......................................................... 197
iv Contents
Part II: Abstraction Mechanisms 221
10 Classes ........................................................................................ 223
11 Operator Overloading ................................................................. 261
12 Derived Classes ........................................................................... 301
13 Templates .................................................................................... 327
14 Exception Handling .................................................................... 355
15 Class Hierarchies ........................................................................ 389
Part III: The Standard Library 427
16 Library Organization and Containers .......................................... 429
17 Standard Containers .................................................................... 461
18 Algorithms and Function Objects ............................................... 507
19 Iterators and Allocators ............................................................... 549
20 Strings ......................................................................................... 579
21 Streams ........................................................................................ 605
22 Numerics ..................................................................................... 657
Part IV: Design Using C++ 689
23 Development and Design ............................................................ 691
24 Design and Programming ........................................................... 723
25 Roles of Classes .......................................................................... 765
Appendices 791
A The C++ Grammar ...................................................................... 793
B Compatibility .............................................................................. 815
C Technicalities .............................................................................. 827
Index 869 |