Lectures
The slides that I show during the lectures will appear below as the course proceeds.
The lectures are on Wednesdays, 10–12, and Thursdays, 13–15.
Lectures will be online, and zoom links will be posted in Canvas.
Note that the lecture slides contain topics and suggested reading for the following lecture.
# | Subject | Slides |
---|---|---|
L1 | Introduction: functions | L1 |
L2 | Introduction cont'd: data types and variables | L2 |
L3 | Modularity: source code organization and error handling | L3 |
L4 | Classes | L4 |
L5 | Resource management | L5 |
L6 | Generic programming: standard algorithms and iterators | L6 |
L7 | Templates and function objects | L7 |
L8 | Classes: const overloading and inheritance | L8 |
L9 | More about resource management and the standard library | L9 |
L10 | Examples. More about the standard library | L10 |
L11 | Low level details and loose ends | L11 |
L12 | Recap and about the project | L12 |
L13, L14 | no lecture |
Examples
Code examples from, or related to, the lectures
Lecture 5:
typecast.cc : example type cast to change the value of an object by changing its type.
unsigned.cc : example of implicit arithmetic conversion.
Lecture 6:
print.cc : a minimal function template example
fn-state.cc : an example of a stateful function object
lambda.cc : an example of the difference between capture by value and by reference
Lecture 9:
example_copying.cc : example of resource management for containers
Lecture 10:
ratio.cc : example of compile_time rational numbers using std::ratio
ref.cc : example of the standard reference wrapper and std::ref
meta.cc : example of compile-time computation of n!
variadic.cc : example of a variadic template
enable_if.cc : example of metaprogramming for selecting which overload to be used for a particular type