April 2022
Intermediate to advanced
528 pages
13h 34m
English
I assume that you already know many nonrules and myths about C++. Some of these nonrules and myths predate modern C++ and sometimes even contradict modern C++ techniques. Sometimes these nonrules and myths were best practices for writing good C++ code. The C++ Core Guidelines address the most resistant don’ts but also provide alternatives.
This rule is a relict of the C89 standard. C89 doesn’t allow the declaration of a variable after a statement. This results in a significant distance between the variable declaration and its usage. Often the variable is not initialized. This is exactly what happens in the example provided by the C++ Core ...
Read now
Unlock full access