The C++ Programming Language: Language Library and Design Tutorial

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

In this brand-new third edition of The C++ Programming Language, author Bjarne Stroustrup, the creator of C++, presents the full specification for the C++ language and standard library, a spec that will soon become the joint ISO/ANSI C++ standard.

Past readers will find that the new edition has changed a great deal and grown considerably to encompass new language features, particularly run-time type identification, namespaces, and the standard library. At the same time, readers will recognize the lucid style and sensible advice that made previous editions so readable and enjoyable. Probably the biggest change is a substantial new section, well over 200 pages in length, covering the contents and design of the C++ standard library, the most important new feature of the C++ specification. The author has also added a substantial number of new exercises while keeping many from previous editions that have retained their value.

While The C++ Programming Language is not a C++ tutorial, strictly speaking, anyone learning the language, especially those coming from C, will greatly benefit from the clear presentation of all its elements. It is impossible to overstate the importance of this book for anyone who is serious about using C++.

Author(s): Bjarne Stroustrup
Edition: 3
Publisher: Addison-Wesley
Year: 1999

Language: English
Pages: 910

Cover
Title Page
Contents
Preface to the First Edition
Preface to the Second Edition
Preface
Introductory Material
1 Notes to the Reader
1.1 The Structure of This Book
1.2 Learning C++
1.3 The Design of C++
1.4 Historical Note
1.5 Use of C++
1.6 C and C++
1.7 Thinking about Programming in C++
1.8 Advice
2 A Tour of C++
2.1 What is C++?
2.2 Programming Paradigms
2.3 Procedural Programming
2.4 Modular Programming
2.5 Data Abstraction
2.6 Object Oriented Programming
2.7 Generic Programming
2.8 Postscript
2.9 Advice
3 A Tour of the Standard Library
3.1 Introduction
3.2 Hello, world!
3.3 The Standard Library Namespace
3.4 Output
3.5 Strings
3.6 Input
3.7 Containers
3.8 Algorithms
3.9 Math
3.10 Standard Library Facilities
3.11 Advice
Part I: Basic Facilities
4 Types and Declarations
4.1 Types
4.2 Booleans
4.3 Character Types
4.4 Integer Types
4.5 Floating Point Types
4.6 Sizes
4.7 Void
4.8 Enumerations
4.9 Declarations
4.10 Advice
4.11 Exercises
5 Pointers, Arrays, and Structures
5.1 Pointers
5.2 Arrays
5.3 Pointers into Arrays
5.4 Constants
5.5 References
5.6 Pointer to Void
5.7 Structures
5.8 Advice
5.9 Exercises
6 Expressions and Statements
6.1 A Desk Calculator
6.2 Operator Summary
6.3 Statement Summary
6.4 Comments and Indentation
6.5 Advice
6.6 Exercises
7 Functions
7.1 Function Declarations
7.2 Argument Passing
7.3 Value Return
7.4 Overloaded Function Names
7.5 Default Arguments
7.6 Unspecified Number of Arguments
7.7 Pointer to Function
7.8 Macros
7.9 Advice
7.10 Exercises
8 Namespaces and Statements
8.1 Modularization and Interfaces
8.2 Namespaces
8.3 Exceptions
8.4 Advice
8.5 Exercises
9 Source Files and Programs
9.1 Separate Compilation
9.2 Linkage
9.3 Using Header Files
9.4 Programs
9.5 Advice
9.6 Exercises
Part II: Abstraction Mechanisms
10 Classes
10.1 Introduction
10.2 Classes
10.3 Efficient User Defined Types
10.4 Objects
10.5 Advice
10.6 Exercises
11 Operator Overloading
11.1 Introduction
11.2 Operator Functions
11.3 A Complex Number Type
11.4 Conversion Operators
11.5 Friends
11.6 Large Objects
11.7 Essential Operators
11.8 Subscripting
11.9 Function Call
11.10 Dereferencing
11.11 Increment and Decrement
11.12 A String Class
11.13 Advice
11.14 Exercises
12 Derived Classes
12.1 Introduction
12.2 Derived Classes
12.3 Abstract Classes
12.4 Design of Class Hierarchies
12.5 Class Hierarchies and Abstract Classes
12.6 Advice
12.7 Exercises
13 Templates
13.1 Introduction
13.2 A Simple String Template
13.3 Function Templates
13.4 Using Template Arguments to Specify Policy
13.5 Specialization
13.6 Derivation and Templates
13.7 Source Code Organization
13.8 Advice
13.9 Exercises
14 Exception Handling
14.1 Error Handling
14.2 Grouping of Exceptions
14.3 Catching Exceptions
14.4 Resource Management
14.5 Exceptions That Are Not Errors
14.6 Exception Specifications
14.7 Uncaught Exceptions
14.8 Exceptions and Efficiency
14.9 Error Handling Alternatives
14.10 Standard Exceptions
14.11 Advice
14.12 Exercises
15 Class Hierarchies
15.1 Introduction and Overview
15.2 Multiple Inheritance
15.3 Access Control
15.4 Run Time Type Information
15.5 Pointers to Members
15.6 Free Store
15.7 Advice
15.8 Exercises
Part III: The Standard Library
16 Library Organization and Containers
16.1 Standard Library Design
16.2 Container Design
16.3 Vector
16.4 Advice
16.5 Exercises
17 Standard Containers
17.1 Standard Containers
17.2 Sequences
17.3 Sequence Adapters
17.4 Associative Containers
17.5 Almost Containers
17.6 Defining a New Container
17.7 Advice
17.8 Exercises
18 Algorithms and Function Objects
18.1 Introduction
18.2 Overview of Standard Library Algorithms
18.3 Sequences and Containers
18.4 Function Objects
18.5 Nonmodifying Sequence Algorithms
18.6 Modifying Sequence Algorithms
18.7 Sorted Sequences
18.8 Heaps
18.9 Min and Max
18.10 Permutations
18.11 C Style Algorithms
18.12 Advice
18.13 Exercises
19 Iterators and Allocators
19.1 Introduction
19.2 Iterators and Sequences
19.3 Checked Iterators
19.4 Allocators
19.5 Advice
19.6 Exercises
20 Strings
20.1 Introduction
20.2 Characters
20.3 Basic_string
20.4 The C Standard Library
20.5 Advice
20.6 Exercises
21 Streams
21.1 Introduction
21.2 Output
21.3 Input
21.4 Formatting
21.5 File Streams and String Streams
21.6 Buffering
21.7 Locale
21.8 C Input/Output
21.9 Advice
21.10 Exercises
22 Numerics
22.1 Introduction
22.2 Numeric Limits
22.3 Standard Mathematical Functions
22.4 Vector Arithmetic
22.5 Complex Arithmetic
22.6 Generalized Numeric Algorithms
22.7 Random Numbers
22.8 Advice
22.9 Exercises
Part IV: Design Using C++
23 Development and Design
23.1 Overview
23.2 Introduction
23.3 Aims and Means
23.4 The Development Process
23.5 Management
23.6 Annotated Bibliography
23.7 Advice
24 Design and Programming
24.1 Overview
24.2 Design and Programming Language
24.3 Classes
24.4 Components
24.5 Advice
25 Roles of Classes
25.1 Kinds of Classes
25.2 Concrete Types
25.3 Abstract Types
25.4 Node Classes
25.5 Actions
25.6 Interface Classes
25.7 Handle Classes
25.8 Application Frameworks
25.9 Advice
25.10 Exercises
Appendices and Index
A The C++ Grammar
A.1 Introduction
A.2 Keywords
A.3 Lexical Conventions
A.4 Programs
A.5 Expressions
A.6 Statements
A.7 Declarations
A.8 Classes
A.9 Templates
A.10 Exception Handling
A.11 Preprocessing Directives
B Compatibility
B.1 Introduction
B.2 C/C++ Compatibility
B.3 Coping with Older C++ Implementations
C Technicalities
C.1 Introduction and Overview
C.2 The Standard
C.3 Character Sets
C.4 Types of Integer Literals
C.5 Constant Expressions
C.6 Implicit Type Conversion
C.7 Multidimensional Arrays
C.8 Saving Space
C.9 Memory Management
C.10 Namespaces
C.11 Access Control
C.12 Pointers to Data Members
C.13 Templates
C.14 Advice
I Index
Extras
A Brief Look at C++
A Perspective on ISO C++
What is "Object-Oriented Programming"?
Stroustrup: The C++ Programming Language (Third Edition)