ไธญๆ็ๆฌ is also available.
This bootcamp aims to provide you with foundational knowledge of modern C++ programming. The C++ language is extremely rich and broad in its features โ it cannot be fully covered in a single bootcamp, and frankly, this language is best learned through practice. The staff believes that the 15-445 course will make you a more confident C++ programmer! That said, we do cover some C++ concepts that are essential for completing the programming assignments. This tutorial does not cover basic C/C++ syntax; it focuses primarily on C++ programming features, especially concepts that do not exist in C.
This repository provides a structured, bilingual (English & Chinese) introduction to modern C++ โ derived from CMU's 15-445/645 bootcamp and extended with detailed notes, translated code comments, and community contributions. It is designed for self-paced learning and as a reference for developers transitioning from C to modern C++.
| # | Chapter | Code | Notes |
|---|---|---|---|
| 1 | References and Move Semantics | references.cpp | N/A |
| move_semantics.cpp | Move Semantics | ||
| move_constructors.cpp | Move Constructors | ||
| 2 | C++ Templates | templated_functions.cpp | Templated Functions |
| templated_classes.cpp | N/A | ||
| 3 | Misc | wrapper_class.cpp | Wrapper Classes |
| iterator.cpp | Iterators | ||
| namespaces.cpp | Namespaces | ||
| 4 | Containers | vectors.cpp | Vectors |
| sets.cpp | Sets | ||
| unordered_maps.cpp | Hash Maps | ||
| auto.cpp | auto | ||
| 5 | Memory | unique_ptr.cpp | Smart Pointers I |
| shared_ptr.cpp | Smart Pointers II | ||
| 6 | Synch Primitives | mutex.cpp | Mutex |
| scoped_lock.cpp | Scoped Lock | ||
| condition_variable.cpp | Condition Variable | ||
| rwlock.cpp | Read-Write Lock | ||
| - | spring2024 | s24_my_ptr.cpp | N/A |
The bootcamp contains several C++ source files located under each chapter directory โ it is recommended to study them in depth. Each source file compiles into an executable with the same name. Use CMake to build all executables:
$ mkdir build
$ cd build
$ cmake .. # invoke CMake to locate CMakeLists.txt in the parent directory
$ make -j8 # invoke Make to compile; -j enables parallel builds (8 CPU cores max)After running these commands, the generated executables will be in the build directory. For example, 1 - References and Move Semantics/references.cpp compiles to the references executable under ./build. The same applies to all other source files.
While this bootcamp strives to be as comprehensive as possible, it still only covers the fundamentals of using modern C++. As you apply C++ to build larger programs, you will need to consult many other available resources. Here are a few examples โ they are all very comprehensive (far more so than this bootcamp), though they may be somewhat less approachable in terms of readability. That said, I believe it is still worth trying to read and understand these materials, especially when working on projects.
- cppreference: an unofficial but fairly accurate summary of the C++ and C standards, with examples
- cplusplus: includes both a C++ language tutorial and a C++ library reference
- Modern C++ Tutorial: this GitHub repository contains useful information and practice exercises
This project is based on 15445-bootcamp from CMU, translated and extended with detailed notes. The original source code copyright belongs to the original authors. All content is licensed under Apache License 2.0.
Contributions are welcome! See CONTRIBUTING.md for guidelines, and please follow our Code of Conduct.
