Open main menu

Difference between revisions of "Code Formatting Conventions"

→‎Whitespaces: mention arrow operator
m (Text replacement - "<source lang=" to "<syntaxhighlight lang=")
(→‎Whitespaces: mention arrow operator)
Line 140: Line 140:
int i = 0;
int i = 0;
int &ref = i;
int &ref = i;
</syntaxhighlight>
'''Arrow operator'''
We use put no spaces around the arrow operator.
<syntaxhighlight lang="cpp">
int a = foo->bar;
</syntaxhighlight>
</syntaxhighlight>