c-cpp-notes
c-cpp-notes copied to clipboard
Lecture notes and example code for teaching C & C++
Can I find pdf-version or I should make it by myself? I don't really want to set up everything I need for this :)
The rule-of-3 lecture ignores move semantics (because I don't actually have time to cover this when I teach in person). But in this day and age, it's probably important to...
https://stackoverflow.com/questions/18222926/why-is-list-initialization-using-curly-braces-better-than-the-alternatives
The full pdf is ~850 slides and thus hard to navigate. Add table of contents and other helpful links.
This clarifies the structure of a slide at a glance, and makes it easier to parse code/keywords when they appear in the middle of a sentence.
https://en.cppreference.com/w/cpp/language/constexpr It's not currently mentioned in the course. But is a key C++11 and has a bearing on, for example, initialization of static fields.
Definition and simple examples of overloading don't appear until the operator overloading section. But this could be discussed early in the context of C. It's a common source of confusion...
This eases things later when we talk about C++ classes. Can refer back it in discussion of constructors, "instantiation"