Difference between revisions of "Code Formatting Conventions"

Jump to navigation Jump to search
→‎Whitespaces: add section about references
m (→‎Whitespaces: wording)
(→‎Whitespaces: add section about references)
Line 123: Line 123:
<syntax type="C++">
<syntax type="C++">
const char *ptr = (const char *)foobar;
const char *ptr = (const char *)foobar;
</syntax>
'''References'''
We use the same rule for references as we do for pointers: use a whitespace before the "&" but not after it.
<syntax type="C++">
int i = 0;
int &ref = i;
</syntax>
</syntax>


561

edits

Navigation menu