Google C++ style guide

Filenames should be all lowercase with underscores (_) or dashes (-)

hello_world.cc

 

All types like classes, structs, type aliases, enums, and type should be capitalized.

class Person

 

Variables should be all lowercase with underscores

string table_name

 

Data member in the class (not struct) should contain a trailing underscores

string var_in_class_

 

Use a struct only for passive objects that carry data; everything else is a class

 

Variables declared constexpr or const should start with “k”, followed by mixed character

const int kDaysInAWeek

 

Functions should be capitalized and use mixed character

AddTableEntry()

 

Namespace names are all lower-case

websearch::index::frobber_internal

 

Macros should be all capital letter (not recommended by Google for ordinary usage)

#define PI_ROUNDED 3.0