Hide menu

TDDD38 Advanced Programming in C++

Exercises


Most of these assignments are outdated, look at the seminars page instead

Theory questions and programming exerciser are for learning C++, to preparing for the computer exam, and is supposed to be carried out on your own time. How the programming exercises are related to the lecures is described below, and you should keep with this plan to be prepared for following lectures and in the end the exam.

Theory Questions

Examples of theory questions are given to ease such studies. No answers are given!

Programming Exercises

Some of these exercises are marked with (old). What this means is that they are from previous iterations of the course and might not reflect the current state of the course. They will (eventually) be updated and/or switched for other exercises. Note that these exercises are still good to solve, but there might be some concepts covered that are outdated.

Basic Language Constructs — suitable for seminar 1

Vector — suitable for seminar 2

Smart pointer (old) — suitable for seminar 2

Geometric objects (old) — suitable for seminar 3

Calculator — suitable for seminar 3

Function Templates — suitable for seminar 4

Static Queue — suitable for seminar 5

Specialization & Type Traits — suitable for seminar 5

Variadic Templates — suitable for seminar 5

Policy-based Class Design for Smart Pointers (old) — suitable for seminar 5

The Curiosly Recurring Template Pattern (CRTP) (old) — suitable for seminar 5

Character Traits (old) — suitable for seminar 5

Mixed Templates — suitable for seminar 6

SFINAE and overload priortiy — suitable for seminar 6

Container Design (old) — suitable for seminar 6

Fixed Size Container (old) — suitable for seminar 6

Indexable Set (old) — suitable for seminar 6

Ordered List Iterators (old) — suitable after seminar 6

Insertion Techniques (old) — standard library, suitable after seminar 6

Custom Deque — write your own std::deque, suitable after seminar 7

Standard Library (old) — mixed standard library exercises, suitable material for STL seminars

Print all the things! — templates and STL, suitable after seminar 9

See also previous exams.

Utilities

High Integrity C++ Coding Standard

Tracer - a class with a default constructor, copy constructor, copy assigment operator, and destructor, which prints trace messages, allowing for following object creation, copying, and destruction.

demangle() — a function to do "name demangling", i.e translate (demangle) a name used internally by g++ (mangled name) for, e.g., a type name, back to the actual name. Demangle takes a std::type_info object as argument, calls std::type_info::name(), which will return the mangeled name, and give this mangled name to the implementation supplied function __cxa_demangle(), which does the demangling.


Page responsible: Christoffer Holm
Last updated: 2019-11-28