As a step-by-step tutorial, this book teaches all language features and explains their practical usage. Intuitive examples are used that are neither too complex to distract, nor oversimplified. A key concept in C++ is programming with templates, which can help to program generic solutions - for example implementing polymorphism. Nicolai Josuttis teaches how to combine templates with object-oriented programming to produce the power of modern C++ development for high performance programs. It is a book that goes well beyond the basics.
A supplementary website, including source code, can be found at www.josuttis.com/cppbook
- comprehensive, detailed, readable, practical and up-to-date
- teaches how to get the power from C++, using the current ANSI language standard and programming mode
- specific hints help C and Java programmers switch and compare languages.
- website provides more examples and links to useful online resources.
Table of Contents
1. About this Book.
Why Did Write this Book?
Organization of the Book.
How Should You Read this Book?
Example Code and Additional Informations.
2. Introduction: C++ and Object-Oriented Programming.
The C++ Language.
C++ as an Object-Oriented Programming Language.
Other Concepts of C++.
3. Basic Concepts of C++ Programs.
The First Program.
Types, Operators, and Control Constructs.
Functions and Modules.
Pointers, Arrays, and C-Strings.
Memory Management Using new and delete.
Communication with the Outside World.
4. Class Programming.
The First Class: Fraction.
Operators for Classes.
Running Time and Code Optimization.
References and Constants.
Input and Output Using Streams.
Friends and Other Types.
Exception Handling for Classes.
5. Inheritance and Polymorphism.Virtual Functions.
Design Pitfalls with Inheritance.
6. Dynamic and Static Members.
Other Aspects of Dynamic Members.
Inheritance of Classes with Dynamic Members.
Classes Containing Classes.
Static Members and Auxiliary Types.
Non-Type Template Parameters.
Additional Aspects of Templates.
Templates in Practice.
8. The Standard I/O Library in Detail.
The Standard Stream Classes.
Stream Classes for Strings.
9. Other Language Features and Details.
Additional Details of the Standard Library.
Defining Special Operators.
Additional Aspects of new and delete.
Function Pointers and Member Pointers.
Combining C++ with C Code.
Hierarchy of C++ Operators.
Class-Specific Properties of Operations.
Rules for Automatic Type Conversion.
Useful Programming Guidelines and Conventions.