Advanced C++ Programming

[hmenu id=3]

Course Description

C++ is the standard language for implementing object-oriented designs, but although based on C, C++ introduces many subtle syntactic and design issues. For developers whose C++ experience goes back further, many of the changes as a result of standardization make standard C++ a very different programming environment.

This course will keep the audience abreast of these changes. It covers four main areas: new and advanced language features; using the standard library; implementing object-oriented concepts and patterns in C++; effective C++ programming techniques and idioms. It also suggests ways to maximize efficiency, code quality, and reusability.

This a comprehensive five-day course with a combination of lectures and practical sessions for each chapter to reinforce the topics covered throughout the course. The practical use code skeletons, so that you can concentrate on specific C++ features. The course contains an appendix on the latest language enhancements of C++ 11.

Course’s goal

Delegates will gain a greater understanding of the capabilities and potential pitfalls of the C++ language and will be more able to use C++ language features to write robust, quality software and you will have a good grounding to make the best use of specific component technologies.

  • You must have solid and genuine experience of C++ including class definitions and member functions; constructors and destructors; references; virtual functions; new and delete operators.
  • Ideally, you will have attended one of our C++ programming courses and have been using C++ solidly for at least six months. You should also have an appreciation of object-oriented principles.

On completing this course, delegates will be able to:

  • Describe advanced inheritance issues, such as private inheritance, multiple inheritance, and virtual base classes
  • Use advanced C++ language features and programming techniques, such as Run-Time Type Identification (RTTI), smart pointers and delegation
  • Use different memory management techniques and strategies to customize and optimize memory usage in a C++ program
  • Design, implement and use template functions and template classes
  • Take advantage of the standard C++ library
  • Design and use container classes and iterators
  • Use C++ exceptions to simplify error handling in large programs
}

40 Hours

Software Engineering

h

Certificate: No

Price: contact us for more details

Don’t Be Shy

Leave your details and one of our customer service representatives will respond to you as soon as possible

Course Outline

 

 

 

 

  • Evolution of Standard C++
    • ISO C
    • ISO C++
    • Overview of the standard library

    C++11 Language Enhancements

    • Changes to the language and syntax
    • lambdas, R-values and move constructor
    • additions to the standard library

    C++ and OO Refresher

    • Abstraction and encapsulation
    • Composition and association
    • Inheritance and polymorphism
    • Patterns and idioms

    Copying and Conversions

    • The static cast, dynamic cast, const_cast and reinterpret cast keyword casts
    • Logical vs. physical constness and the mutable keyword
    • Converting constructors and the explicit keyword
    • User defined conversion operators
    • Copy construction and assignment

    Scope

    • Static class members
    • The Singleton pattern
    • Nested classes
    • Nested class forward declarations
    • The Cheshire Cat idiom
    • Namespaces

     

     

    Delegation Techniques

    • The Object Adapter pattern
    • The Null Object Pattern
    • The Proxy pattern
    • Overloading the member access operator
    • Smart pointers
    • The Template Method pattern
    • Factory objects

     

    Subscripting Techniques

    • Overloading the subscript operator
    • Overloading with respect to const-ness
    • Smart references
    • Multi-dimensional subscripting
    • Associative containers

     

    Template Functions

    • Using and implementing generic algorithms with template functions
    • Overloading and specializing template functions
    • Template instantiation and linkage

     

    Template Classes

    • Using and implementing generic types with templates classes
    • Multiple template parameters
    • The standard vector, list, pair, and map template classes

     

Iterators and Algorithms

  • The need for Iterators
  • The standard library (STL) iterator model
  • Generic algorithms using iterators
  • STL algorithm pitfalls
  • Introduction to function objects

Exception Handling and Safety

  • Reviewing Exception handling
  • Strategies for handling exceptions
  • Resource acquisition idioms for exception safety
  • Exceptions in constructors
  • Exceptions in destructors
  • Exception safe classes
  • STL exception safety guarantees

Memory Management

  • Object life cycle
  • Allocation failure
  • Customizing memory allocation
  • Optimizing allocation for a class through caching
  • Derivation safe allocation
  • Controlling timing of construction and destruction

Reference Counting

  • Reference counting shared representation
  • Reference counted strings for copy optimization
  • Subscripting issues
  • Smart pointers for simple, automatic garbage collection

Inheritance Techniques

  • Subtyping vs. sub classing
  • Abstract and concrete base classes
  • Inheritance scoping issues
  • Multiple inheritance
  • Virtual base classes
  • Interface classes
  • Mixing classes
  • Runtime type information (RTTI)
  • Private and protected inheritance
  • The Class Adapter pattern

Functional Abstraction

  • Traditional callbacks using function pointers
  • The Command pattern
  • More on function objects
  • Member function pointers

Template Techniques

  • Template on precision
  • Template adapters
  • Default template parameters
  • Template specialization
  • Trait classes
  • Member templates
  • Non-type template parameters
  • Optimizing template code space

Multithreading Techniques

  • Creating multithreaded applications in C++ using the new std: thread class and other related classes new to C++11
  • Brief overview of essential threading concepts
  • Dealing with interesting issues concerning shared data, using locks, atomic and conditional variables