STYLE GUIDE * make scope as local as possible - use (static) class attributes rather than global variables - import names into functions rather than into global scope * identifiers - use CamelCase - names of classes start with upper case: MyClass - if renaming a type with typedef, new type starts with upper case - names of functions (both standalone and methods) start with lower case ex.: myVar, myFunc() - do not upperase global constants or enums: // const int MY_CONST=2; <-- is bad - use trailing underscore for member variable names (to distinguish them from local vars and parameters in member functions): myMemberVar_ * declare variables at the point where they are first needed * avoid standalone functions besides main() * use default parameter values to minimize the number of overloaded function declarations/definitions * access modifier in class definitions should be in this order (i.e. interface first, implementation last): public: protected: private: * define accessors (queries) with trailing "const" * for constructors, use member initialization lists rather than in-body assignments * make destructors of base classes virtual, create a virtual destructor for every abstract class * never redefine an inherited non-virtual function: pointer to base class will use the base-classs function * use !=containr.end() rather than