Adivce from the father of C++II

Advice
[1] Prefer the standard library to other libraries and to "handcrafted code"
[2] Avoid complicated expressions
[3] If in doubt about operator precedence,parenthesize;
[4] Avoid explicit type conversion(casts);
[5] When explicit type conversion is necessary,prefer the more specific case operators to the C-style cast;
[6] Use the T(e) notation exclusively for well-defined construction;
[7] Avoid expressions with undefined order of evaluation;
[8] Avoid goto;
[9] Avoid do-statements
[10] Don't declare a variable until you have a value to initalize it with;
[11]Keep comments crisp(简洁,清晰);
[12]Maintain a consistent indentation style
[13]Prefer defining a member operator new() to replacing the global operator new();
[14]When reading input,always consider ill-formed input;

你可能感兴趣的:(C++,职场,休闲)