Skip to main content

Instructor-led training

Advanced C++ for Experts - Design Patterns, STL, C++11/C++14 Training in Raymore, Missouri

This 2-day intensive Advanced C++ class is designed to coach the experienced C++ developer on enterprise system C++ coding and design standards.

What you'll learn

This 2-day intensive Advanced C++ class is designed to coach the experienced C++ developer on enterprise system C++ coding and design standards. Students will be given a review of Polymorphism, Virtual Functions, Function Pointers and Multiple Inheritance. A solid introduction to Design Patterns follows. Once we have laid the groundwork, the training nicely dovetails into a thorough introduction to the STL and new topics in C++11/C++14.

Private Training for Teams

This course is offered as private, instructor-led training for organizations, onsite in Raymore, Missouri or live online. Dates, delivery format, and course content are arranged around your team's requirements.

This course is not currently scheduled as a public class for individual enrollment.

Request Group Training

Prerequisites

Solid understanding of Object Oriented programming with a minimum of 2 years of C++ development experience.

Course Outline

Review
Templates
Function Templates
Class Templates
Function Objects
Design Pattern Overview
Objectives in Software Design/Module Design
Overview of Patterns
Qualities of a Pattern
Pattern Systems
Heuristics vs. Patterns
 
Principles of Object-Oriented Design
Overview of Principles
Single-Responsibility Principle (SRP)
Open-Closed Principle (OCP)
Tell vs. Ask
Command/Query Separation (CQS)
Composed Method
Combined Method
Liskov Substitution Principle (LSP)
Dependency Inversion Principle (DIP)
Interface Segregation Principle (ISP)
Law of Demeter
 
Catalog of GoF Patterns
Overview of GoF Patterns
Introduction to Creation Patterns
Factory Method
Abstract Factory
Builder
Prototype
Singleton
Introduction to Structural Patterns
Adapter
Decorator
Proxy
Facade
Composite
Flyweight
Bridge
Summary of Structural Patterns
Introduction to Behavioral Patterns
Chain of Responsibility
Iterator
Strategy
Template Method
Mediator
Observer
Memento
Command
State
Visitor
Interpreter
 Other Micro-Architecture and System Patterns
Object Pool
Worker Thread
Dynamic Linkage
Cache Management
Type Object
Extension Object
Smart Pointer (C++)
Session
Transaction
 
Advanced Polymorphism and Inheritance
Good Class Design
String Class
Public Inheritance
Public Inheritance Problems
Inheritance and Semantics
Private Inheritance
Composition
Composition vs. Private Inheritance
Templates vs. Inheritance
Protected Inheritance
Implementation Encapsulation
Interface Inheritance
 
Runtime Type Information
Runtime Type and Polymorphism
type_info Class
typeid Operator
Compiler Options
Safe Pointer Conversions
Dynamic Cast
New C++ Style Casts
Static Cast
Reinterpret Cast
Const Cast
Inheritance Hierarchies and Multiple Inheritance
Class Hierarchy in Smalltalk
Smalltalk Class Hierarchy (Simplified)
Collection Classers
Multiple Inheritance Solution
Basic Derivation
Ambiguities in Multiple Inheritance
Resolving Ambiguity
Duplicate Subobjects
Virtual Base Classes
 
An Overview of Templates
Templates
Overloading Functions
Template Functions
Specializing a Template Function
Disambiguation under Specialization
Template Classes
An Array Template Class
Instantiating a Template Class Object
Friends of Template Classes
Templates with Multiple Type Parameters
Non Class-type Parameters for Template Classes
Comments Regarding Templates
Templates and Inheritance
 
Overview of STL
Perspective
History and Evolution
New Features
The Standard Template Library
Generic Programming
Design Goals
Header Files
STL Components
Containers
Algorithms
Iterators
Compiling STL Code
 
Examples from STL
vector
Vector.cpp
list
List.cpp
map
Map.cpp
set
Set.cpp
multiset
Multiset.cpp
find
FindVector.cpp
find list
merge
Overriding the Default Comparison
Iterators
Iterators.cpp
Functions
Functions.cpp
Function Objects
FunctionObject.cpp
 
STL Containers
Vectors
Vector.cpp
Vector Operations
Typedefs
Deques
deque as Stack
deque Functionality
Lists
Generic Programming
Tradeoff with Lists
List Memory Allocation
list Functionality
Associate Containers
Sets
Sets with User Defined Objects
Multisets (Bags)
Maps
Multimaps
 
STL Iterators
Pointers
Template Version
String Version
A Generalization of Pointers
STL Iterators
Input Iterators
Output Iterators
Forward Iterators
Bidirectional Iterators
Random Access Iterators
 
C++11/C++14 Highlights
Range-based for-loops
RValues and move semantics
Initializer lists
Variadic Templates
Lambda Foundations
Generic lambdas
Extended capture
Lambda Iterator concept
Lambda Containers
Lambda Functions

Where experienced C++ developers still get stuck

The syllabus covers four areas that interlock: object-oriented design, the inheritance and casting machinery, templates with the STL, and the C++11/C++14 highlights. Each depends on the one before it, and most of the errors are subtle.

  • Patterns are a design vocabulary, not a code library. The course starts with design principles (SRP, OCP, LSP, DIP, ISP, Law of Demeter, Tell vs. Ask, Command/Query Separation) and then walks the GoF creational, structural and behavioral patterns. It also covers micro-architecture patterns such as Object Pool, Worker Thread, Cache Management and Smart Pointer. A common misconception is that a pattern is a template to copy. The syllabus's "Heuristics vs. Patterns" and "Qualities of a Pattern" topics address when a pattern fits and when it only adds indirection.
  • Inheritance is more than virtual. The syllabus contrasts public, private and protected inheritance, composition versus private inheritance, and templates versus inheritance. It continues into runtime type information (typeid, type_info, dynamic_cast) and the four C++ casts. Multiple inheritance brings ambiguity, duplicate subobjects and virtual base classes. Choosing the wrong relationship is hard to undo later.
  • Templates and the STL build on each other. Function and class templates, specialization, multiple type parameters and non-type parameters lead into containers, iterator categories (input through random access), function objects and overriding default comparison. Understanding which container operations suit which iterator category explains most STL behavior.
  • The C++11/C++14 block changes habits. Move semantics, initializer lists, variadic templates, range-based for loops, and generic lambdas with extended capture all change how earlier material is written. Lambdas are tied back to iterators and containers.

Who it suits and what to take around it

This is an advanced, two-day course. It assumes solid object-oriented knowledge and at least two years of C++ development. It suits developers who maintain or extend class hierarchies and want a shared design vocabulary, and team leads who want consistent coding and design standards across a group.

Developers with less hands-on C++ experience may first want C++ Programming. It builds the language fundamentals that this course's fast review of templates, function objects and polymorphism assumes.

For more depth on containers, iterators and algorithms than a section of a two-day course allows, C++ Standard Template Library is a natural follow-on. To focus on the newer language features, Modern C++ Programming using C++11/C++14 covers that territory as its own course. Organizations that work with other language releases can ask about customized private training through a training proposal.

Illustrative scenarios

The scenarios below are illustrations of how the course material can be applied. They are not descriptions of specific organizations or of the course's lab exercises.

  • Untangling a diamond. A team might inherit a class hierarchy where two base classes share a common ancestor and calls are ambiguous. The multiple inheritance topics (duplicate subobjects, virtual base classes, resolving ambiguity) and the composition versus private inheritance discussion give them options for deciding what to restructure.
  • Replacing conditionals with Strategy. A module might select behavior through a growing switch statement. Strategy, Template Method and State, together with function objects and lambdas, let the team compare an object-based design with a callable-based one. The Open-Closed Principle gives them a way to judge the result.
  • Choosing containers for a lookup-heavy component. A team might need ordered lookups, duplicate keys, and frequent insertion in the middle of a sequence. The vector, deque, list, set, multiset, map and multimap material, including the list tradeoffs and user-defined objects in sets, supports that choice. Move semantics and initializer lists then affect how elements are inserted and constructed.

AI coding assistants with these topics

AI coding assistants can draft the boilerplate of a Decorator, Observer or Adapter, explain a long template error message, suggest a lambda equivalent for a function object, and propose unit tests. They are most useful when you already know the design you want.

They are weakest where C++ correctness depends on details the code does not show:

  • Ownership and lifetime in Singleton, Prototype, Flyweight and Object Pool code, including cloning and who deletes what.
  • Missing virtual destructors, slicing, and misuse of dynamic_cast, static_cast or reinterpret_cast in inheritance hierarchies.
  • Iterator invalidation when modifying vectors, deques or lists during iteration.
  • Lambdas that capture by reference and outlive their scope, and use of an object after it has been moved from.

To verify, compile with strict warnings, run the code under address and undefined-behavior sanitizers, and write tests that exercise object lifetime and container mutation. Review generated designs against the principles in the syllabus (LSP and DIP in particular) rather than accepting code because it compiles.

Frequently asked questions

What level is this course?

It is advanced. The syllabus moves quickly through templates and polymorphism, then covers design principles, GoF patterns, inheritance and casting, the STL and the C++11/C++14 highlights.

What should I know before attending?

A solid understanding of object-oriented programming and at least two years of C++ development experience.

Does it cover the whole STL and all of C++11/C++14?

It covers the STL containers, iterators, function objects and examples such as find and merge, plus a highlights block on range-based for loops, move semantics, initializer lists, variadic templates and lambdas. It is not an exhaustive reference to either.

Can this be delivered privately for our team?

Yes. HSG delivers private training for organizations, onsite at the client's location or live online.

Can the content be customized?

Private course content can be customized, including tailoring to the technology versions your organization uses. You can describe your needs through a training proposal request at /Contact?course=hsg_f83a5e9c9ce2bd7a1571324956104.

Training locations

Advanced C++ for Experts - Design Patterns, STL, C++11/C++14 training across the U.S. and beyond.

We provide private Advanced C++ for Experts - Design Patterns, STL, C++11/C++14 training for organizations, onsite at your location or live online, throughout the United States and internationally.

View all Advanced C++ for Experts - Design Patterns, STL, C++11/C++14 training locations

Train your team with HSG

Private, instructor-led training customized for your organization.

  • Onsite or live online delivery
  • Customized curriculum
  • For a single employee or an entire team
  • Flexible scheduling
  • Experienced instructors
Request Group Training

Questions? Call us at 303.377.6176
or email info@hartmannsoftware.com

Ready to train your team?

Let's customize this training for your organization.

Tell us about your employees, your goals, and your preferred schedule. We'll prepare a training proposal covering scope, delivery format, and pricing.