# Linux Kernel Module Cheat

### 27.3. C++

Programs under userland/cpp/ are examples of ISO C programming.

- userland/cpp/empty.cpp

- userland/cpp/hello.cpp

- iostream

  - userland/cpp/copyfmt.cpp: `std::copyfmt` restores stream state, see also: https://stackoverflow.com/questions/12560291/set-back-default-floating-point-print-precision-in-c/53673686#53673686

- fstream

  - userland/cpp/file_write_read.cpp

  - userland/cpp/temporary_directory.cpp: illustrates `std::filesystem::temp_directory_path` and answers https://stackoverflow.com/questions/3379956/how-to-create-a-temporary-directory-in-c/58454949#58454949

- random

  - userland/cpp/random.cpp

- containers

  - associative

    - userland/cpp/set.cpp: `std::set` contains unique keys

    - userland/cpp/map.cpp: `std::map`

    - userland/cpp/multimap.cpp: `std::multimap`

  - Algorithms contains a benchmark comparison of different c++ containers

- C++ classes

- C++ standards

- C++ initialization types

- C++ multithreading

- C++ templates

- C++ type casting

- C++ compile time magic

- C++ concepts

- C++ third-party libraries