C++ for Non C Programmers

5 Day Course
Hands On
Code QACPP

This course has been superseded by the Modern Expressive C++ course.

Modules

Hide all

C++ Programs (6 topics)

  • Key features of C++
  • Identifiers and keywords
  • Simple declarations, expressions and statements
  • Basic I/O
  • Layout
  • Guidelines

Fundamental Data Types (10 topics)

  • Built-in types
  • Integer numbers
  • Floating Point numbers
  • Characters
  • Booleans
  • Assignment
  • Compound Assignment
  • Increment and Decrement
  • Defining constants
  • Type conversions

Composite Data Types (6 topics)

  • Defining and using enumerations
  • Built-in arrays and their limitations
  • Using the vector class
  • Built-in strings as character arrays
  • Using the string class
  • Defining and using structures

Control Flow (4 topics)

  • Simple and compound statements
  • Selection with if else and switch statements
  • Conditional expressions
  • Looping with while and for statements

Functions (9 topics)

  • Declaring, calling and defining functions
  • Overloading
  • Default arguments
  • Scope issues
  • Pass by copy
  • Pass by reference
  • Inline functions
  • Header files and source files
  • Pitfalls and guidelines

Object Concepts (5 topics)

  • Object behaviour
  • Object state
  • Object identity, Object-oriented programming
  • Classes
  • Encapsulation

Using Classes (5 topics)

  • Associating functionality with data
  • Class definitions
  • Public and private
  • Queries functions and modifier functions
  • Struct vs class

Pointers (5 topics)

  • Concepts and syntax
  • Pointers to structured types
  • Pointers for encapsulated objects
  • Null pointers
  • Pointers vs. references

Implementing Classes (9 topics)

  • Defining member functions
  • Object identity
  • The this pointer
  • Initialisation
  • Constructors
  • Default constructors
  • Member Initialisation
  • Scope issues
  • Inlining member functions

Operator Functions (5 topics)

  • Operators as functions
  • Global operators
  • Member operators
  • I/O stream operators
  • Pitfalls and guidelines

Object Relationships (5 topics)

  • Associations and their implementation
  • Compositions and their implementation
  • Navigation
  • Delegation
  • Multiplicity

Dynamic Memory (6 topics)

  • The need for dynamic memory
  • Dynamic objects
  • Using new and delete
  • Dynamic arrays;
  • Using new[] and delete[]
  • Destructors

More Pointers (5 topics)

  • Pointers and arrays
  • Pointer arithmetic
  • Pointers as array iterators
  • Pointers and const
  • Pointers vs. references

Containers (8 topics)

  • Container concepts and classification
  • Template classes
  • Standard containers
  • Vector
  • List
  • Iterators
  • Template functions
  • Algorithms

Copying (7 topics)

  • Copy construction
  • Copy assignment
  • Compiler generated copy behaviour
  • Problems
  • Solutions
  • Reducing Copying
  • Restricting Copying

Class Relationships (4 topics)

  • Extension of existing classes using inheritance
  • Polymorphic behaviour
  • Type substitutability
  • Abstract base classes

Inheritance (6 topics)

  • Protected members
  • Substitutability
  • Scoping
  • Base class initialisation
  • Order of object construction and destruction
  • Guidelines

Polymorphism (5 topics)

  • Declaring and defining virtual functions
  • Virtual destructors
  • Pure virtual functions
  • Using polymorphism through pointers and references
  • Guidelines

The Way Ahead (3 topics)

  • Support after this course
  • Further C++ information sources
  • Appendices

Prerequisites

Programmers who wish to learn C++, using its object orientated features and/or its enhanced features

Course PDF

Print

Sections