Need help with c-cpp-notes?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

218 Stars 29 Forks 154 Commits 8 Opened issues


Lecture notes and example code for teaching C & C++

Services available


Need anything else?

Contributors list

# 126,213
154 commits

C & C++ programming notes

License: CC BY 4.0

  • Author: Ben Langmead

These are lecture notes and example code for teaching C & C++. The slides themselves are written in a custom "runnable Markdown" dialect for C/C++. These files have extension

. The script that "compiles"
files is
. This script:
  • Generates C/C++ source files based on specially-formatted comments in the Markdown (
  • Runs shell commands based on specially-formatted comments in the Markdown (
    ), often in order to compile and run the source code
    • Possibly integrates the output from the shell back into the slides, so that output can be included in final rendered doc
  • Uses
    to render a PDF

Outputs consist of (a) a PDF of the slides, (b) source files for all the examples.

All the shell commands are run within a Docker image. We use this image from Docker Hub:

And the corresponding

and scripts used to build/pull/push are available in the
subdirectory. The base image is Fedora 27. The most relevant software versions are:
gdb: Fedora 8.0.1-33.fc27
git v2.14.3


The reality of programming in C and C++ can seem divorced from the conceptual discussions in texts. In these notes, explaining concepts is always intertwined with showing examples. When examples are shown, I give exact code and exact command lines, executed in a predictable environment, so that students can recreate the conditions exactly. I show examples that do work and others that don't. The idea is never to stray too far from a code example.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.