Hide menu

TDDD38 Advanced Programming in C++


Theory questions and programming exerciser are for learning C++, to preparing for the computer exam, and sis upposed to be carried out in scheduled labs and during home work. How the programming exerciser 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 easy such studies. No answers are given!

Programming Exercises

Mixed exercises — smaller exercises relate to material covered by lecture 2-12 (After lecture 2:  basic language constructs, statements; after lecture 4-5: class, overloading, type conversion; after lecture 6-7: derivation; after lecture 7: exceptions).

Aggregates and List initialization — some parts suitable after lecture 3, some after lecture 4-5

Smart pointer — suitable after lecture 5

Geometric objects — suitable after lecture 6-7

Policy-based Class Design for Smart Pointers — suitable after lecture 9

The Curiosly Recurring Template Pattern (CRTP) — suitable after lecture 9

Character Traits — suitable after lecture 9

Container Design — suitable after lecture 10

Fixed Size Container — suitable after lecture 10

Indexable Set — suitable after lecture 10

Ordered List Iterators — suitable after lecture 11

Insertion Techniques — standard library, suitable after lecture 12 (new 2015-02-16)

Standard Library — mixed standard library exercises, suitable after lecture 10-12

See also previous exams.


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: Tommy Olsson
Last updated: 2015-02-16