Hide menu

TDDD38 Advanced Programming in C++

Lectures


Here you can find information about what is planned for the lectures, and meterial related to the lectures (slides, program examples, etc.).

Lecture 2 and 3 (new for the course) are given as a give a quick introduction to basic C++, actually prerequisites. If already familiar with C++, you may therefore concider to skip lecture 2-3, but have a look at the lecture slides!

Handouts and other material

Left-over handout copies are available outside Tommy Olsson's room.

Lecture slides

Material not linked is under overhaul. The order mainly corresponds to the order in which things are covered during the lectures.

Introduction to the course, and to C++ (handed out lecture 1, used lecture 1): Full size  |  2 x 2
Basic C++ (handed out lecture 1, used lecture 2-3): Full size  |  2 x 2
Single class design (handed out lecture 1, used lecture 4-5): Full size  |  2 x 2
Operator overloading (handed out lecture 1, used lecture 4-5): Full size  |  2 x 2
Derived classes, Polymorphism, and RTTI (handed out lecture 5, used lecture 6-7): Full size  |  2 x 2
Exception handling, Namespaces, Preprocessor (one booklet, handed out lecture 5, used lecture 7/9): Full size  |  2 x 2
Templates (handed out lecture 6, used lecture 8-9): Full size  |  2 x 2
C++ Standard Library (handed out lecture ?, used lecture 10-12): Full size  |  2 x 2

Code examples used

Lecture 2-3:Class String (handed out lecture 1, used lecture 4-5)
Lecture 4-5:Class hierarchy Person-Employee-Manager-Consultant (handed out lecture ?, used lecture 6-7)

Other lecture related material

Lecture 5: Program for demonstrating construction/destruction in a complicated suboject lattice (not handed out)
Lecture 6-7: Program examples used on slides about templates (not handed out)
Lecture 8-10: Program examples used on slides about adapters for function pointers and member functions (not handed out)

Study period Vt1, week 2-9



Lecture 1 
14 Jan  

Introduction and overview
Introduction to the course. Overview C++, orientation about course content.


Lecture 2 
16 Jan  

Basic C++
Overview of types (fundamental, compound, aggregates), type conversion, declarations, expression, operators, statements, characters, strings, streams, string streams, file handling, functions, parameter passing, dynamic memory handling, list initialization.


Lecture 3 
17 Jan  

Basic C++ (cont.)
Overview of types (fundamental, compound, aggregates), type conversion, declarations, expression, operators, statements, characters, strings, streams, string streams, file handling, functions, parameter passing, dynamic memory handling, list initialization.


Lecture 4 
21 Jan  

Classes
Definition, deklaration; members, data members, member functions, nested types, enumerators, static members, const member functions, mutable, inline; this (expression wich gives the address for the objekt the member function has been called for); access specification (public, protected, private), friend; implicitly defined operations on class types (member access, scope operator); special member functions (default constructor, copy constructor, copy assignment operator, destructor), compiler generated verions of the special member functions; initializers, type converting constructors, explicit, type converting operator functions; recommendations for single class design.


Lecture 5 
23 Jan  

Classes, cont.

Operator overloading
Rules and restrictions; member or non-member?; friend or not? Overloading, optimized versions. Guidelines and recommendations for definition and overloading of operators.


Lecture 6 
1 Feb  

Derived classes, polymorphism, RTTI
Derivation/inheritance; base class/subclass; singe, multiple and repeated inheritance; public, protected and private inheritance; virtuellt inheritance (virtual); protected member access; virtual function, pure virtual function, pure specifier (=0); polymorf class, abstract class; static type, dynamic type; dynamic type control, dynamic type conversion, RTTI, dynamic_cast, typeid, type_info-objects; up-cast, down-cast, cross-cast;


Lecture 7 
6 Feb  

Derived classes, polymorphism, RTTI, cont.

Exception handling
Try-block, function-try-block, throw-expression, catch-handler; exception specification (for function), exception declaration (in handler); "catch-all" handler; bad_exception; terminate(), unexpected(), uncaught_exception(), abort(); standard exceptions (exception and subclasses); user defined exceptions; recommendations for using exceptions.


Lecture 8 
18 Feb  

Templates
Function templates, class templates; declaration, definition; template parameters, template arguments, default template parameter arguments; template instantiation, implicit instantiation, explicit instantiation; template specialization, implicit specialization, partial specialization, full specialization; function templates and overload resolution; variadic templates, parameter pack, pack expansion; type equivalence for template classes; member templates; friend and template; alias templates; dependent name; SFINAE; the name rule, reference collapsing rules, move semantics, perfect forwarding; meta programming, type traits; compilation models for template code.


Lecture 9 
20 Feb  

Templates, cont.

Namespaces
Namespace, namespace members, anonymous namespaces, namespace alias, using declaration, using directive (using namespace).

Preprocessor
Source code inclusion, simple macros, function macros, conditional compilation.


Study period Vt2, week 14-21



Lecture 10  
?? Mmm  

C++ standard library
Main emphasis on containers, iterators, algorithms, function objects, and related library support.

Introduction, overview
General overview. Containers, iterators, algorithms, function objects, utilities.

Standard containers
Sequential containers, sequential container adaptors, ordered associative containers.


Lecture 11  
?? Mmm  

C++ standard library, cont.

Iterators
Container iterators, inserters, stream iterators.

Standard algorithms
Algorithms (function) for operating on, e.g., containers, streams, etc.


Lecture 12  
?? Mmm  

C++ standard library, cont.

Function objects, lambda expression
Objects that can be used as functions. Important for effective use of containers and algorithms. Lambda exepressions is a way to create simple function objects. Binders, negators, function call adaptors, and standard function objects corresponding to the arithmetic, comparison, and logical operator in C++.


Lecture 13  
?? Mmm  

Reserve...



Page responsible: Tommy Olsson
Last updated: 2013-01-31