C++ (THE COMPLETE REFERENCE Book 4th Edition)
The book is divided into these five parts:
■ The C Subset—The foundation of C++
■ The C++ language
■ The Standard Function Library
■ The Standard Class Library
■ Sample C++ applications
Part One provides a comprehensive discussion of the C subset of C++. As most
readers will know, C is the foundation upon which C++ was built. It is the C subset
that defines the bedrock features of C++, including such things as for loops and if
statements. It also defines the essential nature of C++’s block structure, pointers, and
functions. Since many readers are already familiar with and proficient in C, discussing
the C subset separately in Part One prevents the knowledgeable C programmer from
having to “wade through” reams of information he or she already knows. Instead, the
xxx C++: The Complete Reference
experienced C programmer can simply turn to the sections of this book that cover the
C++-specific features.
Part Two discusses in detail the features that move beyond the C foundation and
define the C++ language These include its object-oriented features such as classes,
constructors, destructors, RTTI, and templates. Thus, Part Two covers those constructs
that “make C++, C++.”
Part Three describes the standard function library and Part Four examines the
standard class library, including the STL (Standard Template Library). Part Five
shows two practical examples of applying C++ and object-oriented programming.
Contents at a Glance
Part I The Foundation of C++: The C Subset1 An Overview of C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2 Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3 Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
4 Arrays and Null-Terminated Strings . . . . . . . . . . . . . . . . 89
5 Pointers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
6 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
7 Structures, Unions, Enumerations,
and User-Defined Types . . . . . . . . . . . . . . . . . . . . . . . . 161
8 C-Style Console I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
9 File I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
10 The Preprocessor and Comments . . . . . . . . . . . . . . . . . . 237
Part II C++
11 An Overview of C++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
12 Classes and Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
13 Arrays, Pointers, References, and the Dynamic
Allocation Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
14 Function Overloading, Copy Constructors,
and Default Arguments . . . . . . . . . . . . . . . . . . . . . . . . . 359
15 Operator Overloading . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383
16 Inheritance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417
17 Virtual Functions and Polymorphism . . . . . . . . . . . . . . . 443
18 Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459
19 Exception Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487
20 The C++ I/O System Basics . . . . . . . . . . . . . . . . . . . . . . . 509
21 C++ File I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539
22 Run-Time Type ID and the Casting Operators . . . . . . . 567
23 Namespaces, Conversion Functions,
and Other Advanced Topics . . . . . . . . . . . . . . . . . . . . . 591
24 Introducing the Standard Template Library . . . . . . . . . . 629
Part III The Standard Function Library
25 The C-Based I/O Functions . . . . . . . . . . . . . . . . . . . . . . . 699
26 The String and Character Functions . . . . . . . . . . . . . . . . 723
27 The Mathematical Functions . . . . . . . . . . . . . . . . . . . . . . 737
28 Time, Date, and Localization Functions . . . . . . . . . . . . . 747
29 The Dynamic Allocation Functions . . . . . . . . . . . . . . . . . 757
30 Utility Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 761
31 The Wide-Character Functions . . . . . . . . . . . . . . . . . . . . . 775
Part IV The Standard C++ Class Library
32 The Standard C++ I/O Classes . . . . . . . . . . . . . . . . . . . . 787
33 The STL Container Classes . . . . . . . . . . . . . . . . . . . . . . . . 811
34 The STL Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 839
35 STL Iterators, Allocators, and Function Objects . . . . . . 861
36 The String Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 881
37 The Numeric Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 897
38 Exception Handling and Miscellaneous Classes . . . . . . 925
39 Integrating New Classes: A Custom String Class . . . . . 935
40 Parsing Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 963
A The .NET Managed Extensions to C++ . . . . . . . . . . . . . . 999
B C++ and the Robotics Age . . . . . . . . . . . . . . . . . . . . . . . . 1005
Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1009
0 Comments