C++ - Global and Local Scope

preview_player
Показать описание
Let's take a look at global and local scope!

Welcome to my C++ learning series! This is a series on various C++ concepts that aims to both shed light on these concepts, test your knowledge, and teach you something along the way. The series will go from easy to hard questions. C++17.

If you would like to see more, please like the video and subscribe.

Комментарии
Автор

been watching your videos for awhile and I'm glad I came across this one. really explained this concept well

JasonHong
Автор

Missed opportunity to say how can we access the global x, but for who is interested to see it :
#include <iostream>
int x =1;

int main() {
int& y = x, x;
x=2;
std::cout << y << x << ::x;
return 0;
}
Output : 121

georgiosdoumas
Автор

Great video!! Is x in the local scope type of int or int&?

jeanniean
Автор

because of the name now dude cannot get a haircut

MultiHeywatsup