Changes

Jump to: navigation, search

Pineapple 20131 - OOP344

413 bytes added, 15:55, 14 February 2013
Coding Style
== Coding Style ==
 
'''Indentation'''
* 4 spaces
'''Blocks'''
* One line for the block quotation like this
 
<syntaxhighlight lang="cpp">
int main()
{
int a;
int b;
if (a == b)
{
cout << "good" << endl;
}
}
</syntaxhighlight>
'''Variable Naming'''
* The first word start with lowercase, and the rest start with uppercase
 
<syntaxhighlight lang="cpp">
char* firstName;
char* lastName;
int age;
</syntaxhighlight>
We will also follow Fardad's rules for proper code
 
<syntaxhighlight lang="cpp">
int a; // good
int b; // good
a; // bad
Single line blocks must be surrounded by { and }
if(whatever) {
do this:
} // good
if(whatever) do this; //bad
if(whatever)
do this; // bad
 
</syntaxhighlight>
== Team Members ==

Navigation menu