
What are coding conventions for?
- Create a specific look for users to focus on content.
- Allow the user to understand the code faster and better.
- Make it easy to copy or modify the code.
Most important conventions:
Layout conventions
- Write only one statement/declaration per line.
- Intend lines.
- Use parentheses to make clauses.
Commenting conventions
- Place the comment on a separate line, not at the end of a line of code.
- Begin comment text with an uppercase letter.
- End comment text with a period.
- Insert one space between the comment delimiter (//) and the comment text.
Here’s a video done by myself for you:
C++ coding conventions by Mferflores is licensed under a Creative Commons Attribution 4.0 International License.