C/C++ - 2016/17

The module is designed differently from most introductions to C or C++, as it is assumed that students are familiar with both Java and functional programming. Thus we can go over anything that is similar to Java very quickly, for example basic control structures (conditionals, while-loops, etc) in C, or the object system in C++, on which Java's was based. Instead, we will focus on the differences from Java. In the first half of the module, we will cover enough C to prepare you for systems-level programming. Specifically, C is a prerequisite for the year 3 optional module Operating Systems; C is also useful for some other modules. In the second half of the module, we will move on to modern C++. That is, not so much object-orientation and inheritance, but advanced features that are close to functional programming, specifically templates.

This modules emphasises features of C and C++ that are important in computer science in general (even if you never actually program in C/C++), specifically:
pointers; memory management (malloc/free in C and new/delete in C++); parametric polymorphism (via templates in C++); types.

Lecture slides


Introduction to templates in C++