C++ style guide: Difference between revisions

65 bytes added ,  1 September 2021
m
Add headings for clarity
m (New naming recommendations)
m (Add headings for clarity)
Line 60: Line 60:
put extra braces anywhere if it improves clarity.
put extra braces anywhere if it improves clarity.


The negation operator is written with a space between the operator
=== Pointer and Reference appearance ===
and its target, e.g., {{codeline|! A}}.


Declarations of pointers have the '*' character cuddled with the name of the variable.
Declarations of pointers have the '*' character cuddled with the name of the variable.
Line 74: Line 73:
unsigned int& reference_variable;
unsigned int& reference_variable;
</syntaxhighlight>
</syntaxhighlight>
=== Miscellaneous ===
The negation operator is written with a space between the operator
and its target, e.g., {{codeline|! A}}.


=== Function headers ===
=== Function headers ===
1,072

edits