Course Description

This course broadens the skills of a C++ language programmer by examining sophisticated C++ concepts such as templates, exceptions, memory management, advanced inheritance issues, disambiguation of overloaded functions, private and protected inheritance, binary I/O and class libraries.



5 days


Target Audience

This course is for anybody who has programmed in C++ and wishes to enhance their knowledge of the language.


Course Prerequisites

Students should have completed an introductory C++ programming course or have equivalent knowledge. These skills are taught in the following course:

If you have any questions or doubts as to whether you meet the pre-requisites for this course, or indeed are wondering which course best suits you, please consult with us to discuss your suitability for course attendance.


Suggested Follow on Courses

Please contact us for further details.


Course Content

Chapter 1: What You Should Already Know – A Review

Rationale for a New Programming Language

The Language of Object-Orientation

A Typical C++ Class

Issues Regarding Member Functions vs. Non-Member Functions

friend or non-friend

Functions Returning References


Initialization Lists

Inheritance In C++

Access Levels

Simple C++ I/O

The Many Uses of const


Chapter 2: Parameterized Types – Templates


Overloading Functions

Template Functions

Specializing a Template Function

Disambiguation Under Specialization

Template Classes

Instantiating a Template Class Object

Rules for Template Classes

A Non-Member Function with a Template Argument

Friends of Template Classes

Templates with Multiple Type Parameters

Comments Regarding Templates


Chapter 3: Relationships of all Kinds

Uses of Member Initialization Lists

Member Initialization Lists Under Composition

Initialization Lists Under Inheritance

Initialization Lists With Multiple Inheritance

Initialization Lists with Multiple Inheritance and Composition


operator= and Composition

Constructors and Composition

What is not Inherited?

operator=, Construction, and Inheritance

Public Inheritance

virtual Functions

A Shape Class Hierarchy


Pure Virtual Functions

Abstract Base Classes

Private Inheritance

using Relationships



Chapter 4: Multiple Inheritance (MI)

Multiple Inheritance


virtual Base Classes

The Dominance Rule

Member Initialization Lists



Chapter 5: Data Structures


A Simple List

Layering Type-safe Classes Upon List

A template List Class


A template Iterator

Stack and Queue Classes

Templates and Inheritance


Chapter 6: Function Pointers

Why Have Function Pointers?

Passing Functions as Arguments

Registering Functions

Function Pointers in C++

Callback Functions

A Class with a Callback Object

Registration of Exception Handlers


Chapter 7: Exceptions

What Are Exceptions?

Traditional Approaches to Error Handling

try, catch, and throw

A Simple Exception Handler

Multiple catch Blocks

The Exception Specification List

Rethrowing an Exception


Exception Matching

Inheritance and Exceptions

Resource Allocation

Constructors and Exceptions

Destructors and Exceptions

Catch by Reference

Standard Exceptions


Chapter 8: The C++ Standard Template Library


The Standard Template Library

Design Goals

STL Components


Example: vector

Example: list

Example: set

Example: map

Example: find

Example: merge

Example: accumulate

Function Objects



Chapter 9: Disambiguation


int Conversion

float + double Conversions

Arithmetic and Pointer Conversion

Inheritance Based Conversion

Overloaded Functions

Exact Match

Match with Promotion

Match with Standard Conversion

User Defined Conversion

Constructors as Conversion Operators



Chapter 10: I/O



Writing Your Own Manipulators

Overloading the I/O Operators

Disk Files

Reading and Writing Objects

Internal Transmission of Data

A Spell Checker

Handling Streams in the Constructor and Destructor

Treating a File as an Array



Chapter 11: Miscellaneous Topics


Use Counts

Reference Counts



Having a Limited Number of Objects

Smart Pointers


See more Programming Languages courses