Skip to main content Skip to navigation

Day 6: Advanced and legacy features

Zoom meeting link for today

https://cern.zoom.us/j/67888545132Link opens in a new window
(the password will be sent on the course Slack channel)

Create new repository for today

https://classroom.github.com/a/g6vgg-vLLink opens in a new window

Raw pointers & C-style arrays

We examine the "legacy" features of raw pointers, C-style arrays and how to manually perform dynamic memory allocation (PDF Document).

Exceptions

We briefly examine how to handle error conditions using exceptions (PDF Document).

Concurrent programming

We look briefly at the features introduced in C++11 that allow a more portable way to write concurrent (or multi-threaded) code (PDF Document).

Special Member Functions

We give more detail on the special member functions (copy constructor, move constructor, copy assignment operator, move assignment operator, destructor), we also provide an introduction to the "move" operations introduced in C++11, and a short discussion of operator overloading (PDF Document).

Containers overview

We provide an overview of the various containers available in the Standard Library, including some ideas of when it is appropriate to use each one and how modern C++ allows more efficient use of them (PDF Document).

Regular expressions and

Random number generation

We take a very quick look at two more very useful features added in the C++11 standard. In particular, support for regular expressions (PDF Document) and improved random number generation (PDF Document).