INF205: Lecture material

1. Introduction
- array-intro.cpp
Example for how arrays work in C/C++; the value of the array is the memory address where the contained data are stored.
- conditions-assert.cpp and conditions-gsl.cpp
Checking run-time conditions in traditional style (using assert) and based on more recent recommendations; the latter require the Guidelines Support Library (GSL)
- create-simple-segfault.cpp
With pointer arithmetics, you can easily create wild pointers, accessing parts of memory that should not be accessed in this way, or causing a segmentation fault. So never work with pointers the way it is done in this example.
- explicit-implicit-typing.cpp
C++ permits explicit and implicit static typing; the implicit typing is done using the keyword auto. However, all the types must be known at compile time; therefore, dynamic typing (as in Python) is not possible in C++.
- gauss-ex3.cpp
Winning solution to problem 2, submitted by Fredrik Haugen
- intro-user-advice.pdf
Advice gathered from students on their experience when getting started
- is-prime-900.cpp, is-prime-separate-files.zip, and is-prime-three-files.zip
Brief code example from the first lecture, in three different variants
- namespaces-overloading.zip
Illustration of function overloading in combination with the use of namespaces
- three-functions.cpp
Compact code with three functions that we can look at, using gdb, and follow how the stack frames are allocated and deallocated
2. Memory and objects
3. Data structures and libraries
4. Concurrency
Index