Notation used through this book

Code samples are given throughout this book are for C, C++, Rust and general configuration / console output.
In order to distinguish each kind they are styled as follows:

C / C++ samples are given in this style:

  1. // C/C++
  2. while (x < y) {
  3. cout << "x is less than y" << endl;
  4. ++x;
  5. }

Rust samples are given in this style:

  1. // Rust
  2. if x == 20 {
  3. println!("Warning!");
  4. }

Standard console output or script is given this style:

  1. cd myproject/
  2. cargo build

Most of the code samples are abbreviated in some fashion. e.g. they assume the code is running from within a main() function or they omit noise such as #includes, namespace definitions and so forth.