Answers

Newest first. When a later standard changes an answer, the article is updated in place and says what changed and since when.

Each answer names the standard it is written for: 111417202326

Document
Answers
Answers
105, newest first
Page
1 of 11
Written by
,
Sections
All eight
Feed
RSS
  1. assert in C++: how assert and static_assert work

    assert in C++ explained: what a failed assert prints, how to add a message, how NDEBUG turns it off, and how static_assert checks at compile time.

    Language §1.7Miriam Castellanos6 min readC++17

    written for C++17

  2. Best C++ IDE: which to install on Windows, Mac or Linux

    The best C++ IDE for Windows, Mac or Linux: Visual Studio, VS Code, CLion, Xcode or Qt Creator, where each runs, what is free, and IDE vs compiler.

    Tooling §6.3Tobias Mwangi6 min readC++17

    written for C++17

  3. Binary search in C++: code and std::binary_search

    Binary search in C++: a loop that returns the index, the recursive version, std::binary_search and lower_bound, and why the range must be sorted.

    Standard Library §2.10Miriam Castellanos7 min readC++17

    written for C++17

  4. bool in C++: true, false and how to use them

    bool in C++ explained: true and false, what produces a bool, why cout prints 1 or 0, what converts to bool, bool functions and the common mistakes.

    Language §1.8Miriam Castellanos7 min readC++17

    written for C++17

  5. cin in C++: read numbers, words and lines

    cin in C++ reads what the user types: one value or several with >>, a whole line with getline, and how to fix cin after a letter breaks the read.

    Standard Library §2.11Miriam Castellanos6 min readC++17

    written for C++17

  6. clang-format: format C++ with a .clang-format file

    clang-format lays out C++ code in one command: where the .clang-format file goes, the seven styles, the options people change and a CI check.

    Tooling §6.4Tobias Mwangi8 min readC++17

    written for C++17

  7. What is CMake? A build system generator, explained

    What is CMake? A build system generator, shown with a CMakeLists.txt that builds, the two commands, cmake clean, CMake vs Make, a library and Release.

    Tooling §6.5Tobias Mwangi8 min readC++17

    written for C++17

  8. Compile C++ with GCC: g++ commands and flags

    How to compile C++ with GCC: the g++ command, choosing the C++ standard, the flags a beginner needs, several files, installing GCC and the common errors.

    Tooling §6.6Tobias Mwangi7 min readC++17

    written for C++17

  9. Compiler vs interpreter: what is the difference?

    Compiler vs interpreter: the same program run both ways in C++ and Python, when each one finds an error, why Python is both, and what JIT compilation is.

    Tooling §6.7Tobias Mwangi7 min readC++17

    written for C++17

  10. const in C++: variables, pointers, references, methods

    What const means in C++ on a variable, a pointer, a reference and a member function, with the error the compiler gives for each, and const vs constexpr.

    Language §1.9Miriam Castellanos7 min readC++17

    written for C++17