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
- Miriam Castellanos,
Tobias Mwangi - Sections
- All eight
- Feed
- RSS
assert in C++: how assert and
static_assertworkassert in C++ explained: what a failed assert prints, how to add a message, how NDEBUG turns it off, and how
static_assertchecks at compile time.written for C++17
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.
written for C++17
Binary search in C++: code and
std::binary_searchBinary search in C++: a loop that returns the index, the recursive version,
std::binary_searchandlower_bound, and why the range must be sorted.written for C++17
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.
written for C++17
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.
written for C++17
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.
written for C++17
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.
written for C++17
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.
written for C++17
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.
written for C++17
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.
written for C++17