Course Catalog
Curriculum Guides
Buy Courseware
Technical Library
About Object Innovations
Contact Us

877-558-7246 (toll free)  

157. Advanced C++ Programming

Rev. 1.2


This course is for experienced C++ programmers who wish to deepen their understanding of the language and learn advanced techniques. The course consists of three modules.


A preliminary module reviews topics, including inheritance, the ANSI C++ Standard Library, templates. I/O streams, and practical issues of C++ programming, such as reliability, testing, efficiency and interfacing to C. This material is covered as needed depending on the background of the students.


The second module covers more advanced topics. Advanced issues of inheritance and polymorphism are covered. Principles of effective class design, including the orthodox canonical form, use of composition, templates and interface inheritance. The course covers exception handling and runtime type information (RTTI). Multiple inheritance is covered, including the complications that are introduced by this powerful feature. Advanced applications of C++ concepts are studied, including smart pointers and reference counting.


The third module introduces the Standard Template Library (STL). The main components of data structures, algorithms and iterators are covered. Illustrations are provided of a number of important containers, such as vectors, stacks, queues, lists and sets.

Extensive programming examples and exercises are provided. A number of progressively developed case studies are used to illustrate object oriented programming techniques and to give the student practical experience in putting together features of C++ learned in the course. A file is provided containing all the examples and laboratory exercises in the course.




         Review intermediate features of C++ such as inheritance and templates

         Gain a more complete understanding of the issues involved in effective class design

         Learn important features of C++ such as exception handling, RTTI and multiple inheritance

         Learn advanced techniques such as smart pointers and reference counting

         Gain a working knowledge of the Standard Template Library


Course Duration: 5 days


Prerequisites: C++ programming experience


Module 1. Intermediate C++ Programming


1.      Inheritance and Polymorphism

Class Derivation

Access Control

Base Class Initialization

Initializing Class Type Members

Polymorphism and Virtual Functions

Pointer Conversion

Virtual Destructors

Abstract Classes and Pure Virtual Functions


2.      ANSI C++ Library

New Header Files

Namespaces in the Standard Library

ANSI C++ String Classes

Templates in the Standard Library


3.      Templates

C++ Template Mechanism

Function Templates

Class Templates

Generic Programming

Implementing a General Array Class

Standard Template Library


4.      Input/Output in C++

Streams I/O Library

Formatted Stream I/O

File I/O

I/O in User Defined Classes


5.      Practical Aspects of C++ Programming

Interfacing C and C++


Reliability in C++ Programs

Testing Considerations

Efficiency Considerations


Module 2. Advanced C++ Topics


1.      Advanced Polymorphism and Inheritance

Orthodox Canonical Form

Public, Private and Protected Inheritance

Composition vs. Inheritance

Templates vs. Inheritance

Interface Encapsulation


2.      Exception Handling

C++ Exception Mechanism

Exceptions Compared to Other Error Handling Techniques

throw, try and catch

Exception Context and Stack Unwinding

Uncaught Exceptions

Automatic Cleanup in Exception Handling


3.      Runtime Type Information

Runtime Type Information (RTTI) Mechanism

type_info Class and typeid Operator

Type Safe Pointer Conversion

New C++ Cast Syntax


4.      Inheritance Hierarchies and Multiple Inheritance

Smalltalk Style Class Hierarchies

Collection Classes in Object-Based Hierarchies

Independent Class Hierarchies in C++

Multiple Inheritance

Resolving Ambiguities

Duplicate Subobjects

Virtual Base Classes

RTTI in Multiple Inheritance


5.      Applications of C++ Concepts

Object Validation

Smart Pointers

Reference Counting

Generic Smart Pointers


Module 3. Fundamentals of STL


1.      An Overview of Templates


Overloading functions

Template functions

Specializing a template function

Disambiguation under specialization

Template classes

An array template class

Instantiating a template class object

Rules for templates

Non member function with a template argument

Friends of template classes

Templates with multiple type parameters

Non type parameters for template classes

Comments regarding templates


2.      Overview of the Standard Template Library


History and evolution

New features in C++

The Standard Template Library

Design goals

Header files

STL components





3.      Examples from STL

Example: vectors, lists

Example: maps

Example: sets

Example: multiset

Example: find with a vector

Example: find with a list

Example: merge


Function objects



4.      STL Containers




The beauty of STL

Associative Containers






5.      STL Iterators

Input iterators

Output iterators

Forward iterators

Backward iterators


System Requirements


The course is designed to be delivered in any environment supporting an ANSI C++ compiler.