1,072
edits
Line 103: | Line 103: | ||
=== Function headers === | === Function headers === | ||
In general, in non-header files, format function headers like this: | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
Line 113: | Line 113: | ||
The return type of the function and any modifiers are specified on the first | The return type of the function and any modifiers are specified on the first | ||
line. The function name on the second line should start in column 1, and | line. The function name on the second line should start in column 1, and | ||
multi-line argument lists should be aligned on the first | multi-line argument lists should be aligned on the first character after the open | ||
parenthesis. | parenthesis. Put a space before the left open parenthesis and after | ||
commas, for both function definitions and function calls. | commas, for both function definitions and function calls. | ||
For header files, or in class definitions, it may look better not to split the return type from the rest of the function header. Use your own judgement. | |||
=== Class declarations === | === Class declarations === |
edits