C++


Apply Now

CONTENT

Chapter 1 Fundamentals

Development and Properties of C++

 Object-Oriented Programming

 Developing a C++ Program

A Beginner’s C++ Program 

 Structure of Simple C++ Programs

 Exercises

Solutions

Chapter 2 Fundamental Types, Constants, and Variables

Fundamental Types

Constants

Escape Sequences

Names

Variables

The Keywords const and volatile

 Exercises

Solutions

Chapter 3 Using Functions and Classes

Declaring Functions

 Function Calls

Type void for Functions

 Header Files

Standard Header Files

 Using Standard Classes

 Exercises

Solutions

Chapter 4 Input and Output with Streams

Streams

Formatting and Manipulators

Formatted Output of Integers

Formatted Output of Floating-Point Numbers

 Output in Fields

Output of Characters, Strings, and Boolean Values

 Formatted Input

Formatted Input of Numbers

Unformatted Input/Output

Exercises

Solutions

Chapter 5 Operators for Fundamental Types

Binary Arithmetic Operators

 Unary Arithmetic Operators

 Assignments

Relational Operators

Logical Operators

Exercises

Solutions

Chapter 6 Control Flow

The while Statement

The for Statement

The do-while Statement

Selections with if-else

Else-if Chains

Conditional Expressions

Selecting with switch

Jumps with break, continue, and goto

 Exercises

Solutions

Chapter 7 Symbolic Constants and Macros

Macros

Macros with Parameters

Working with the #define Directive

 Conditional Inclusion

Standard Macros for Character Manipulation

 Redirecting Standard Input and Output

 Exercises

Solutions

Chapter 8 Converting Arithmetic Types

Implicit Type Conversions

Performing Usual Arithmetic Type Conversions

 Implicit Type Conversions in Assignments

More Type Conversions

Exercises

Solutions

Chapter 9 The Standard Class string

Defining and Assigning Strings

 Concatenating Strings

Comparing Strings

Inserting and Erasing in Strings

 Searching and Replacing in Strings

 Accessing Characters in Strings

Exercises

Solutions

Chapter 10 Functions

Significance of Functions in C++

 Defining Functions

Return Value of Functions

 Passing Arguments

Inline Functions

Default Arguments

Overloading Functions

Recursive Functions

Exercises

Solutions

Chapter 11 Storage Classes and Namespaces

Storage Classes of Objects

 The Storage Class extern

The Storage Class static

The Specifiers auto and register

 The Storage Classes of Functions

 Namespaces

The Keyword using

Exercises

Solutions

Chapter 12 References and Pointers

Defining References

References as Parameters

 References as Return Value

 Expressions with Reference Type

 Defining Pointers 230The Indirection Operator

 Pointers as Parameters

Exercises

Solutions

Chapter 13 Defining Classes

The Class Concept

 Defining Classes

 Defining Methods

 Defining Objects

 Using Objects

 Pointers to Objects

 Structs

Unions

Exercise

Solution

Chapter 14 Methods

Constructors

Constructor Calls

Destructors

Inline Methods

Access Methods

const Objects and Methods

 Standard Methods

this Pointer

Passing Objects as Arguments

 Returning Objects

Exercises

Solutions

Chapter 15 Member Objects and Static Members

Member Objects

Member Initializers

Constant Member Objects

 Static Data Members

Accessing Static Data Members

 Enumeration

Exercises

Solutions

Chapter 16 Arrays

Defining Arrays

 Initializing Arrays

Arrays

Class Arrays

 Multidimensional Arrays

 Member Arrays

Exercises

Solutions

Chapter 17 Arrays and Pointers

Arrays and Pointers (1)

 Arrays and Pointers (2)

 Pointer Arithmetic

Arrays as Arguments

Pointer Versions of Functions

 Read-Only Pointers

 Returning Pointers

Arrays of Pointers

Command Line Arguments

 Exercises

Solutions

Chapter 18 Fundamentals of File Input and Output

Files

File Streams

Creating File Streams

Open Modes

Closing Files

Reading and Writing Blocks

 Object Persistence

Exercises

Solutions

Chapter 19 Overloading Operators

Generals

Operator Functions (1)

Operator Functions (2)

Using Overloaded Operators

Global Operator Functions

Friend Functions

Friend Classes

Overloading Subscript Operators

 Overloading Shift-Operators for I/O

 Exercises

Solutions

Chapter 20 Type Conversion for Classes

Conversion Constructors

 Conversion Functions

 Ambiguities of Type Conversions

 Exercise

Solution

Chapter 21 Dynamic Memory Allocation

The Operator new

The Operator delete

Dynamic Storage Allocation for Classes

 Dynamic Storage Allocation for Arrays

 Application: Linked Lists

Representing a Linked List

Exercises

Solutions

Chapter 22 Dynamic Members

Members of Varying Length

 Classes with a Dynamic Member

 Creating and Destroying Objects

 Implementing Methods

Copy Constructor

Assignment

Exercises

Solutions

Chapter 23 Inheritance

Concept of Inheritance

 Derived Classes

Members of Derived Classes

Member Access

Redefining Members

Constructing and Destroying Derived Classes

 Objects of Derived Classes

Protected Members

Exercises

Solutions

Chapter 24 Type Conversion in Class Hierarchies

Converting to Base Classes

Type Conversions and Assignments

 Converting References and Pointers

 Explicit Type Conversions

Exercises

Solutions

Chapter 25 Polymorphism

Concept of Polymorphism

Virtual Methods

destroying Dynamically Allocated Objects

 Virtual Method Table

Dynamic Casts

Exercises

Solutions

Chapter 26 Abstract Classes

Pure Virtual Methods

Abstract and Concrete Classes

Pointers and References to Abstract Classes

 Virtual Assignment

Application: Inhomogeneous Lists

 Implementing an Inhomogeneous List

 Exercises

Solutions

Chapter 27 Multiple Inheritance

Multiply-Derived Classes 588 Multiple Indirect Base Classes 590 Virtual Base Classes 592 Constructor Calls 594Initializing Virtual Base Classes 596 Exercises 598Solutions 602

Chapter 28 Exception Handling

Traditional Error Handlin

 Exception Handling

Exception Handlers

Throwing and Catching Exceptions

 Nesting Exception Handling

 Defining Your Own Error Classes

 Standard Exception Classes

 Exercises

Solutions

Chapter 29 More About Files

Opening a File for Random Access

 Positioning for Random Access

File State

Exception Handling for Files

Persistence of Polymorphic Objects

Application: Index Files

 Implementing an Index File

 Exercises

Solutions

Chapter 30 More About Pointers

Pointer to Pointers

Variable Number of Arguments

 Pointers to Functions

Complex Declarations

Defining Typenames

 Application: Dynamic Matrices

 Exercises

Solutions

Chapter 31 Manipulating Bits

Bitwise Operators

 Bitwise Shift Operators

 Bit Masks

Using Bit Masks

 Bit-Fields

Exercises

Solutions

Chapter 32 Templates

Function and Class Templates

Defining

Templates

Template Instantiation

 Template Parameters

Template Arguments

 Specialization

Default Arguments of Templates

 Explicit Instantiation

Exercises

Solutions

Chapter 33 Containers

Container Types

 Sequences

Iterators

Declaring Sequences

 Inserting in Sequences

 Accessing Objects

 Length and Capacity

 Deleting in Sequences

 List Operations

 Associative Containers

 Sets and Multisets

 Maps and Multimaps

 Bitsets

Exercise

Solution

Appendix

Binary Numbers

Preprocessor Directives

Pre-Defined Standard Macros

Binding C Functions

Operators Overview

Operator Precedence Table

ASCII Code Table

Screen Control Sequences

 Literature

INDEX