Here are some of my notes taken from the C++ style guide from Google. It is a huge document, here I am trying to create a quick summary of ones that I find are more useful.
The full Google Style guide is here
https://google.github.io/styleguide/cppguide.html
From my past internship experiences, people usually want to follow certain style guide for a large code repository. Here is my attempt to train myself to follow a style guide in my PhD time.
- Local Variables
- Naming: variables and data members should all be lower case, with underscores between words (snake case). NOTE: data members of a class have training underscores, e.g. a_class_data_member_
- Declaration: Make sure the variables are initialized. They should be declared close to their uses.
- References: