Open main menu

CDOT Wiki β

Changes

Team Excellence - oop344 20113 Code Standards

335 bytes added, 00:27, 14 October 2011
If Statement
If the "stuff" is only one line the curly braces can be omitted.
 
'''Dzmitry:'''
I have a proposal. How about doing it like this:
<syntaxhighlight lang="cpp">
if (condition){
stuff;
} else if (condition){
stuff;
} else {
stuff;
}
</syntaxhighlight>
That will save a few lines, also space between "stuff" and beginning of the line should be default Visual Studio Tab (Mine is 4 spaces).
 
== For Loop ==
<syntaxhighlight lang="cpp">