Jump to: navigation, search

Team !YOU - Discussions

1,065 bytes removed, 16:22, 5 February 2010
Formatted the page to accomodate all kinds of discussions
<big><big>'''[!YOU_-_OOP344 Team !You]'''</big></big> - To the main team page.
<big><big>'''[!YOU_-_Official_Standards Official Standards]'''</big></big> - Go to team's official programming standards.
= Open Discussions =
Current open discussions
= Team !You Programming Standards Discussion Old Discussions =
==Team !You Programming Standards Discussion = Declare only one variable in each line. ===This makes it easier to scan the code and find the type of a variable that you see somewhere else in the code.
Do: int a; int b = 0; int c = a; Don't: int a, b = 0, c = a; === Do not use tabs when indenting. ===The tab space is interpreted different across different software and operating systems. Use normal spaces to add indentation instead.  ==== (Discussion: Indentation) ====
Something simple, but that should be standard for all pieces of the code.
=== Use Include Guides for Header Files ===
For every header file that we write, we must make sure that it will never be added more than once to different pieces of code. Therefore, all your header file code should be in between the include guides as shown below:
#ifndef _344_EXAMPLE_H_
#define _344_EXAMPLE_H_
The convention for this project is to define our header files in upper case, starting with 344, and enclosed in a single underscore(_)
=== Put the pointer identifier(*) right after the target variable type. ===
Pointers are hard enough to deal with. It only makes it more complicated if they are declared differently throughout the code.
int* p1;
char* p2;
int *p1;
char *p2;

Navigation menu