Menu

#17 Use consistent declaration styles and syntax

open
nobody
None
5
2008-08-25
2008-08-25
Rowan James
No

The ordering and arrangement of class members is inconsistent between classes; we should change each class to follow the form:

class Example
{
public:
Example(); // Param assumed to be 0
Example(int FirstParam); // give an initial Param
virtual ~Example();

int GetParam();
void SetParam(int NewParam);

private:
int Param;
};

Such that public declartions are first; All constructors come before anything else, followed immediately by the destructor.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB