-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Main idea is to teach on the terminal only, with direct interaction with the compiler. No IDE and all the associated software installation / cross-platform problems, etc.
- use of the terminal
- file paths, current working directory, command-line arguments
- iostream / fstream
- std::string
- std::array
- std::vector
- std::format
- std::ranges
- range-based for-loops
- std::find and variants
- std::sort
- lambda functions
- classes & structs
- headers & code files, and how to spread code around them
- templates
- namespaces
- const, const refs, etc.
- inline keyword
- inheritance, aggregation, composition
- use of virtual inheritance via pass-by-reference
Up for debate:
- operator overloading
- friend functions
- static members
- debugging via GDB
- C-style arrays
- pointers
- smart pointers
- aggregation through pointers
- inheritance through pointers
I propose to use remark to prepare the slides. It allows us to write pure markdown, and provide C++ syntax highlighting out of the box. See example slides here, produced from his simple markdown file.
Use MSYS2 with g++
and the micro text editor. See the related software page for full details.
Allow (maybe even encourage?) students to use whatever editor they want, and maybe even experiment with IDEs if they so wish.
Start by compiling on command-line, then maybe use Donald's simple_build bash script to automate - no need to faff about with Makefiles, CMake or anything else - it should Just Work™.
For projects that would benefit from graphical output, consider using Donald's terminal_graphics header-only project. This allows plotting simple graphs and displaying 2D arrays on a sixel-capable terminal (including minTTY, installed as part of MSYS2).
- C++ Will No Longer Have Pointers (joke, but on point...)
- Stop teaching C
- C++ FAQ
- A beginner's guide to C++ Ranges and Views
- C++20 text formatting: an introduction
- C++ Basics: Understanding Lambda
- C++20 Concepts - a Quick Introduction (probably beyond this course, but good to know nonetheless)
- cheat sheet
- gdbgui: probably the best debugging experience outside of an IDE..
- start [args ...]
- list [l]
- info locals [i loc]
- print [p ]
- watch
- delete N
- backtrace [bt]
- next [n]
- continue [c]
- advance N [adv N]
- step [s]
- finish [f]
- quit [q]
- break N [b N]