C++ variable scope explained 🌎

  Рет қаралды 7,065

Bro Code

Bro Code

2 ай бұрын

#local #global #variables
Local and global variable scope in C++ tutorial example explained

Пікірлер: 12
@BroCodez
@BroCodez 2 жыл бұрын
#include int myNum = 3; //global void printNum(); int main() { int myNum = 1; //local printNum(); std::cout
@FrederikWollert
@FrederikWollert 3 ай бұрын
I really like your C++ series. Keep it up. Please make more C++ Videos. So, let's defeat the KZbin algorithm.
@hehefunny9129
@hehefunny9129 Жыл бұрын
Yu the best ❤️
@gamsterilyass2952
@gamsterilyass2952 Ай бұрын
❤ ❤
@yahyaarfaoui8526
@yahyaarfaoui8526 Жыл бұрын
std::cout
@Nightmare-bo7xi
@Nightmare-bo7xi 8 күн бұрын
so what is printNum and how is it related to myNum
@oximas-oe9vf
@oximas-oe9vf Жыл бұрын
what do you mean by " "pollutes" the global namespace " ?
@BurninVinyl
@BurninVinyl 4 ай бұрын
Re-watch about namespace. In C++ global variables can potentially pollute the namespace by making it more difficult to disambiguate between variable names and other entities with the same name. This can lead to code that is harder to read and maintain. It's generally recommended to use namespaces or other scoping mechanisms to avoid this issue.
@TahaProgrammer
@TahaProgrammer Жыл бұрын
yo
@parpaperchimp
@parpaperchimp 5 ай бұрын
#include int P =3.14; int main(){ std::cout
@wlsedlacek
@wlsedlacek Жыл бұрын
comment = rand(random_comment) % 100;
@artemzakharchuk2842
@artemzakharchuk2842 9 ай бұрын
std::cout
C++ GETTERS & SETTERS explained easy 🔒
6:12
Bro Code
Рет қаралды 8 М.
The Algorithm Behind Spell Checkers
13:02
b001
Рет қаралды 409 М.
小宇宙竟然尿裤子!#小丑#家庭#搞笑
00:26
家庭搞笑日记
Рет қаралды 8 МЛН
STRUCTS in C++ explained 🏗️
5:01
Bro Code
Рет қаралды 8 М.
Water powered timers hidden in public restrooms
13:12
Steve Mould
Рет қаралды 648 М.
Understanding B-Trees: The Data Structure Behind Modern Databases
12:39
Variable scopes w\ examples (Local vs Global vs Block vs Nested)
20:12
What are C++ namespaces? 📛
4:37
Bro Code
Рет қаралды 28 М.
Generics: The most intimidating TypeScript feature
18:19
Matt Pocock
Рет қаралды 169 М.
C++ From Scratch: Constexpr
9:45
CoffeeBeforeArch
Рет қаралды 9 М.
Global Variables in C++... not as easy as it seems
18:25
The Cherno
Рет қаралды 61 М.
#samsung #retrophone #nostalgia #x100
0:14
mobijunk
Рет қаралды 13 МЛН
Частая ошибка геймеров? 😐 Dareu A710X
1:00
Вэйми
Рет қаралды 4,2 МЛН