Go to the Datasim Education BV homepage Datasim Education BV Datasim Education BV Datasim Education BV Datasim Education BV Datasim Education BV
Courses
Books
Downloads
Information request
Forum



Follow datasim on Twitter

Share this page

COURSE DETAILS
C++ Training




Course Category: 
Course: 


Fundamentals of C++11  - (code CPP-F)

The goal of this four-day hands-on C++ course is to introduce the most recent version of the C++ programming language. It was approved by ISO in 2011 and it replaces C++03. C++11 is a major upgrade to the language and in some ways it feels like a new language. It is for this reason that we now offer a comprehensive course based on the standard while not forgetting the existing features in C++03. Some of the new features in C++11 that improve the language considerably and that we discuss in detail are:

  • Improved language features.
  • Smart pointers and automatic memory management.
  • Standardised function declaration (function type wrappers).
  • New and improved libraries.
  • C++ multiparadigm support for object-oriented, generic and functional programming models.

We introduce these topics and we explain them in a way that is understandable to C++ novices. In many cases the syntax in C++11 is easier to understand and to apply than the equivalent syntax in C++03.

Subjects Covered and Benefits

In this course we deal with the major language features in C++11 that will the standard for the coming years:

  • Why C++11 is a major extension to C++03.
  • Detailed introduction to the object-oriented, generic and functional programming styles in C++.
  • The Standard Template Library (STL); STL algorithms in detail.
  • Creating robust and reliable applications.

Having finished the course the student will be able to use the features in C++11 in their daily work.


Course contents

Part 1 Fundamental Object-Oriented Programming

The Class Concept

  • Abstract Data Type (ADT)
  • Data and operations
  • Encapsulation and Information Hiding
  • Single Responsibility Principle (SRP)
  • Class instantiation and objects

Classes in C++

  • The structure of a C++ class
  • Member data and member functions
  • Categories of member functions
  • Constructor and destructor
  • Private and public members

Improving the Class

  • Function name overloading
  • Reference and value
  • The many facets of const
  • Copy constructor
  • Non-member functions

Operator Overloading

  • What is operator overloading, really?
  • Binary and unary operators
  • Operators: member and non-member versions
  • Assignment operator and the this keyword
  • Operator overloading for console input and output

Advanced Operator Overloading

  • Pre and postfix operators
  • Indexing operators [] and ()
  • Function objects and the function call operator
  • Comparing function objects with function pointers
  • Conversion operators

Part 2 Advanced Object-Oriented Programming

Object Oriented Modelling

  • Relationships between classes
  • ISA (Gen/Spec) relationship
  • HASA (composition, aggregation) relationship
  • Combining HASA and ISA
  • The dangers of ISA

Simple Inheritance in C++

  • Base class and derived class
  • Inheritance scenarios
  • Accessibility issues (private, public, protected)
  • What is and what is not inherited
  • Overriding functions

Advanced Inheritance in C++

  • Subtype polymorphism and virtual functions
  • Pointers to base classes and run-time switching
  • Abstract classes and interfaces
  • Virtual destructors
  • Performance and virtual functions

Part 3 Programming with Functions in C++11

Fundamentals of Functional Programming (FP)

  • Short history of FP
  • Higher-order functions
  • Recursion; passing a function to itself
  • Strict and non-strict (delayed) evaluation
  • Pure functions and lambda functions

Lambda Functions

  • What is a lambda function?
  • The closure of a lambda function
  • Using lambda functions with auto
  • The mutable keyword

A Taxonomy of Functions in C++

  • Function pointers and free functions
  • Object and static member functions
  • Function objects
  • Lambda functions

Part 4 Generic Programming and C++ Templates

Introduction

  • Abstract Data Types (ADTs) and Generic Programming
  • Function and class templates
  • Template parameters
  • Instantiation and specialization
  • Declarations versus definitions
  • Template arguments versus template parameters

Class Templates

  • Template declaration
  • Implementing the member functions
  • Using the template class
  • Default template arguments
  • Examples

Function Templates

  • What is a function template?
  • Defining the template
  • Using the template
  • Argument deduction
  • Overloading function templates
  • Advanced Template Programming
  • Partial specialization
  • Nested template classes (for example, 1:N aggregations)
  • Traits and policy classes
  • Template template parameters

Part 5 The Standard Template Library (STL)

STL components

  • Containers
  • Iterators
  • Algorithms

Iterators

  • Iterator categories
  • Input and output iterators
  • Random-access iterators
  • Auxiliary iterator functions

Sequential and Associative Containers

  • Vectors and lists
  • Sets, maps and multimap
  • C++ 11 unordered containers
  • Examples and applications

Complexity Analysis

  • Computational and asymptotic complexity
  •  Big-O notations
  • Other measures of complexity
  • Potential problems
  • NP-completeness

Algorithms in STL

  • Overview of STL Algorithms
  • Algorithm Categories
  •  Algorithms with Function Parameters
  • Non-mutating Sequence Algorithms
  • Mutating Sequence Algorithms
  • Sorting and searching

Special Containers and Data Structures

  • Fixed-sized arrays
  • Tuples
  • Bitsets
  • Hash functions
  • String class

Part 6 Improved and new Language Features

New Language Features I

  • Keywords 
  • auto
  • decltype
  • noexcept
  • constexpr
  • nullptr

New Language Features II

  • Uniform initialization and initializer lists
  • Default template parameters
  • Function declaration syntax
  • New fundamental data types

Move Semantics

  • What is move?
  • Copying versus moving: performance
  • Rvalue references
  • Move constructor and move assignment

Part 7 Robustness and C++

Exception Handling

  • Error handling and exceptions
  • Throwing and catching exceptions
  • Exception hierarchy
  • Polymorphic and explicit nets
  • Order of handlers
  • Exception specification
  • Layering Exceptions

Namespaces

  • Why using namespaces
  • Using classes in a namespace
  • Placing classes in a namespace
  • Nested namespaces
  • Aliases
  • Name lookups

Run Time Type Information

  • What is RTTI
  • type_info class and operator typeid
  • typeid and inheritance
  • Casting operators and type-safe casting using RTTI

Smart Pointers and Memory Management

  • Design rationale
  • Class shared_ptr
  • Destruction policies
  • Class weak_ptr
  • Class unique_ptr
  • Performance and reliability

File Access

  • File stream class
  • File flags
  • Random access
  • File descriptors

Stream and Strings

  • String stream classes
  • Move semantics for string streams
  • char* stream classes

Prerequisites

Knowledge of at least one high-level programming language (for example, Java, C#, C, Pascal) is strongly recommended at the level of variables, functions and memory management and general program structure. It is not necessary to know object-oriented programming as this topic is part of the course.

No knowledge of C or of C++ is required.


Who should attend?

 


Duration, price, date, locations
Course duration 4 days
Dates and locations (click on date to print registration form)

Date Location Price Language
8, 9, 10, 11 november 2016 Hotel Mercure, Nieuwegein Euro 1840.-- Dutch
16, 17, 18, 19 january 2017 Hotel Mercure, Nieuwegein Euro 1720.-- Dutch
21, 22, 23, 24 march 2017 Hotel Mercure, Nieuwegein Euro 1720.-- Dutch

Attention:
For courses given at a location other than the Datasim office in Amsterdam, you will need to bring your own laptop with a C++ compiler like Visual C++.

It is also possible to organize this course at your company premises (the in-company option). If you have any question, please contact our Datasim office.

Follow-up courses

Share this page

Contact and Profile
Registration form
Course Dates