Instructor-Led Red Hat Training

Advanced C++

5 days

This hands-on course introduces object-oriented programming in C++ including C++ class construct, scope and access control mechanisms, polymorphism and virtual functions, the Standard Template Library, and I/O streams. Other topics include virtual functions, polymorphism, memory management, function and operator overloading, STL, RTTI, and practical issues, such as reliability, testing, efficiency, and interfacing to C.

What you will learn:

  • C++ language constructs
  • Supported data types
  • C++ program layout and design
  • Console I/O routines and operators
  • Definition and use of classes
  • Function interaction with class objects
  • Sharing data with called routines
  • Accessing files and records
  • The use of the Standard Template Library
  • Modern C++ features and how to apply them in production systems
  • To become proficient in advanced C++ topics such as templates, concurrency, object-oriented design, and performance optimization
  • To apply best practices for writing clean, efficient, and maintainable C++ code
  • To develop the skills necessary to analyze, optimize, and troubleshoot complex C++ applications

Course Outline

Standard Library Containers and Iterators

  • Introduction to Containers
  • Introduction to Iterators
  • Introduction to Algorithms
  • Sequence Containers
  • Associative Containers
  • Container Adapters
  • Class bitset

Standard Library Algorithms

  • Minimum Iterator Requirements
  • Lambda Expressions
  • Algorithms
  • Function Objects
  • Standard Library Algorithm Summary

Exception Handling

  • Exception-Handling Flow of Control; Defining an Exception Class
  • Rethrowing an Exception
  • Stack Unwinding
  • When to Use Exception Handling
  • noexcept: Declaring Functions That Do Not Throw Exceptions
  • Constructors, Destructors and Exception Handling
  • Processing new Failures
  • Class unique_ptr and Dynamic Memory Allocation
  • Standard Library Exception Hierarchy

Introduction to Custom Templates

  • Class Templates
  • Function Template to Manipulate a Class-Template Specialization Object
  • Nontype Parameters
  • Default Arguments for Template Type Parameters
  • Overloading Function Templates

Custom Templatized Data Structures

  • Always Prefer the Standard Library’s Containers, Iterators and Algorithms, if Possible
  • Self-Referential Classes
  • Linked Lists
  • Stacks
  • Trees

Class string and String Stream Processing

  • string Assignment and Concatenation
  • Comparing strings
  • Substrings
  • Swapping strings
  • string Characteristics
  • Finding Substrings and Characters in a string
  • Replacing Characters in a string
  • Inserting Characters into a string
  • Conversion to Pointer-Based char* Strings
  • Iterators
  • String Stream Processing
  • C++  Numeric Conversion Functions

Searching and Sorting

  • Searching Algorithms
  • Linear Search
  • Binary Search
  • Sorting Algorithms
  • Insertion Sort
  • Selection Sort
  • Merge Sort (A Recursive Implementation)

Bits, Characters, C Strings and structs

  • Structure Definitions
  • typedef and using
  • Example: Card Shuffling and Dealing Simulation
  • Bitwise Operators
  • Bit Fields
  • Character-Handling Library
  • C String-Manipulation Functions
  • C String-Conversion Functions
  • Search Functions of the C String-Handling Library
  • Memory Functions of the C String-Handling Library

Preprocessor

  • #include Preprocessing Directive
  • #define Preprocessing Directive: Symbolic Constants
  • #define Preprocessing Directive: Macros
  • Conditional Compilation
  • #error and #pragma Preprocessing Directives
  • Operators # and ##
  • Assertions

Back to top