Engineering Tool: Advanced Programming with C++ (151-0093-00L)


Course at D-MAVT of ETH Zürich, September 2018 , Felix Friedrich, Florian Negele

Date Message
12.9.2018 Information: if available, bring a notebook with internet access to the course. We will do the (online) exercises in a tutorial-like style in the second half of each lecture. Using a tablet without keyboard is possible but deprecated.
14.9.2018 exercise subscription link active
17.9.2018 added links to exercises (not yet released)
18.9.2018 patched minor bugs in yesterdays slides

Timetable

Tuesday, 18.09.2018 HG E3 13:00-15:00 Lecture
15:00-17:00 Tutorial
Wednesday, 19.09.2018 HG E7 13:00-15:00 Lecture
15:00-17:00 Tutorial
Thursday, 20.09.2018 HG F5 13:00-15:00 Lecture
15:00-17:00 Tutorial

Abstract / Oberview

The programming model of C++ is discussed in some depth. In particular the mechanisms for efficient memory management and generic programming with C++ are covered. Students develop an ability to implement memory-efficient data structures and efficient generic algorithms using C++.

Content in detail: Vectors, pointers and iterators, range for, keyword auto, a class for vectors, subscript-operator, move-construction and iteration. RAII (Resouce Allocation is Initialization) Principle, Templates and Generic Programming, Functors and Lambda Expressions.

Prerequisites: Lecture Series Informatik I 252-0832-00L or equivalent knowledge in programming with C++.

Agenda, Slides and Exercises

This is a plan. No plan survives contact with reality. We will constantly update lecture material before the lecture takes place.

Date Topic Slides and Handouts Exercise
Tue 18.9. RAII: vectors, pointers and iterators, range for, keyword auto, a class for vectors, subscript-operator, move-construction, iterators Organisation [de] [en]
Slides [de] [en]
Handouts [de] [en]
[Registration]
[Exercise 1]
[Exercise 1 with old IDE]
Wed 19.9. Templates: templates of classes, function templates, specialization, templates with values Slides [de] [en]
Handouts [de] [en]
[Exercise 2]
Thu 20.9. Functors and Lambdas: objects with operator (), closures, lambda expressions, captures, function variables Slides [de] [en]
Handouts [de] [en]
[Exercise 3]

Contact

Florian Negele

Felix Friedrich

Literature

Bjarne Stroustrup: Einführung in die Programmierung mit C++, Pearson Studium, 2010 | Also available online from the ETH Domain

Bjarne Stroustrup: Chapter 18 from Programming, Principles and Practice Using C++

Andrew Koenig and Barbara E. Moo: Accelerated C++, Addison-Wesley, 2000.

Other useful resources