This is the public repository for the IACS C
/C++
primer. The primer
consists of 10 lectures held in week 42/43 in October 2021:
Mo Tu We Th Fr Sa Su
Oct 27 28 29 30 1 2 3
40 4 5 6 7 8 9 10
41 11 12 13 14 15 16 17
42 18 19 20 21 22 23 24
43 25 26 27 28 29 30 31
The primer is intended to refresh language features for C
/C++
. A previous
class taken for either language or experience gathered through other means is
assumed.
Location: SEC LL2.224 SU Family Classroom
Time: 6:30PM - 7:30PM
Date:
- 10/18 - 10/22 (week 42)
- 10/25 - 10/29 (week 43)
Meeting times: The mini-class takes place during calendar week 42 and 43. Lectures are held on each week day (Mon-Fri) from 6:30PM - 7:30PM (depending on discussions during the lectures, you may need a bit of additional padding regarding the 60 minute duration).
Lectures 1-4 discuss basic concepts that were firs introduced in C
. Lectures
5-10 focus on C++
specific language features that are not available in C
.
- Procedural languages and Object Oriented Programming / General overview
- Compiled languages / Stages of code compilation / Get to know your compiler
- How to organize code in files / Headers, circular inclusion and header guards / Compilation units
- Building code /
make
/meson
/cmake
- Basic built-in types
- Arrays
- Pointers
- Pointers are not arrays
- Pointers and dereference operator
- References (C++ specific)
- Basic operators and operator precedence
- Functions and function pointers
- Anonymous functions / Lambdas (C++ specific)
- Function arguments: Pass-by-value / Pass-by-reference
- Memory allocation
- Stack and heap
- Input/Output (IO) / Streams
- Object Oriented versus Data Oriented designs / Where is
C++
good at and where can it hurt you - Classes: Constructors / Initializer lists / Destructors / Members / Attributes
- Access modifiers
- Resource Acquisition Is Initialization (RAII)
- Operator overloading
- Inheritance and the
this
pointer
- Base class pointer
- Polymorphism and interfaces
- Abstract base classes
- Pure virtual methods
- Operator overriding
- Generic programming
- C++ templates
- Implementation approaches
- Standard Template Library (STL)