This repo contains little examples demonstrating certain concepts from C++. They are slightly cleaned up versions of notes I wrote during the uOttawa course CSI 2372.
All of the examples in ./experiments
have been tested with GCC.
To compile, run, and remove the compiled files:
- Open a terminal in the
./experiments
directory. - Execute:
g++ -std=c++17 1-hello.cpp && ./a.out && rm ./a.out
You can wrap this in a handy bash function:
function c++ {
g++ -std=c++17 -Wall -Wextra $1.cpp && ./a.out && rm ./a.out
}
With this, running a single file can be done with:
c++ hello
This repo tries to follow Google's C++ style guide. VS Code can be configured to automatically format code in this style (instructions).
Each experiment is numbered, but this indicates more about when the experiment was added rather than anything about difficultly.