C/C++ Programming Style Guidelines
at the end of the broken line rather than at the start of the continuation line.
characters. When breaking lines, use the natural logical breaks to determine where the
newline goes. Indent the continuation line to illustrate its logical relationship to the rest
of the code in the line. For functions, for example, this means aligning arguments with
the opening parenthesis of the argument list.
around all conditional code blocks, even one-line blocks, and put the opening bracket at
the end of the line with the opening statement. The exception to this rule is for
conditions that are broken across multiple lines. In this case put the open bracket on a
line by itself aligned with the start of the opening statement (as shown above).