Variable names should consist of lowercase words connected by underscores, e.g.
Class and struct names should consist of words with first letters capitalized, e.g.
Macros should be capital start with
TI, such as
- We do not encourage the use of macro, although there are cases where macros are inevitable.
Filenames should consist of lowercase words connected by underscores, e.g.
autofor local variables when appropriate.
C language legacies:
free. Use smart pointers (
std::unique_ptr, std::shared_ptrinstead for ownership management).
Prefix member functions with
Virtual function call in constructors/destructors.
using namespace std;in global scope.
Automatic code formatting¶
- Please run