分类: C/C++
2008-09-24 01:14:27
|
short names for locals: npoints , not numberOfPoints
i, j loop indices, p, q for pointers, s, t for strings
begin with p for pointer, initial capital letters for Globals, all capitals for CONSTANS
Use active names for functions:
|
Fuction that return a boolean value should be named so that the return value is unambiguous
|
|
Define numbers as constants, not marcros
C++:const int MAXROW = 24;
C: enum {MAXROW = 24};
Don't belabor the obvious
Comment functions and global data