C++ Style Guide | Writing Clean C++ Code | Formatting Conventions

preview_player
Показать описание
The style of how we write C++ code is just as important as how the syntax and semantics are. This video will give you an overview of C++’s formatting conventions and some tips on writing clean C++ code.
Please support the channel by subscribing.👍

🔗Links:

🚩Chapters:
0:00​ Intro
1:37 Why Care About Style?
2:40 Include Statements
6:03 Naming Conventions
7:15 Pascal Case
8:49 Punctuation Marks
10:20 Formatting
11:45 Indentation
12:30 Line Length
12:59 Hello World Program

I would love it if you could take the time to like and share this video with others. That would really mean a lot for me and this channel. Keep supporting Coding Cleverly!

Follow on GitHub:

Plugins🔌
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

SUBSCRIBE🔔
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Relevancy dies in a heartbeat, and I would love to sustain this channel in the long run. Every subscriber counts and it really means the world if you were one of them. So please SUBSCRIBE to my CHANNEL.

Most Engrossing Videos🎬
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

Gear⚙️
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Laptop: HP Spectre 13
Microphone: PC Mic

Mentions👥
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Рекомендации по теме
Комментарии
Автор

In 14:22, you can run the code by typing "myProgram.exe" or simply "myProgram".
"myProgram.out" was written by mistake.
If you emit the -o flag, the executable file will be named a.out by default.

CodingCleverly
Автор

Functions beginning with a capital letter look uncanny to me. You sure about that? :))

banu
Автор

Only one i disagree with is { } convention. I much prefer
class Vehicle
{
...code goes here
}

Makes it feel like everything has a title and keeps { } at the same indent, so you can see where code starts and stops, especially when you have { } inside { }.

void foo (bla bla)
{
for ( ...)
{
...Code goes here
}
}

weemanling
Автор

Pascal case for c++ doesn't make sense because the standard lib and even the main function don't follow it. I usually stay away from Google anything when it comes to programming because their stuff is a hot mess.

chudchadanstud
Автор

Get to the point my man, you're all over the place in this video.

klymen
Автор

And remember, never use spaces for intending

botowner
Автор

Open curly braces on the same line as the item name... ugh 🤮

perfectionbox
Автор

And never recommend "using namespace";

vikinggeorge