#local #global #variables Local and global variable scope in C++ tutorial example explained
Пікірлер: 12
@BroCodez2 жыл бұрын
#include int myNum = 3; //global void printNum(); int main() { int myNum = 1; //local printNum(); std::cout
@FrederikWollert3 ай бұрын
I really like your C++ series. Keep it up. Please make more C++ Videos. So, let's defeat the KZbin algorithm.
@hehefunny9129 Жыл бұрын
Yu the best ❤️
@gamsterilyass2952Ай бұрын
❤ ❤
@yahyaarfaoui8526 Жыл бұрын
std::cout
@Nightmare-bo7xi8 күн бұрын
so what is printNum and how is it related to myNum
@oximas-oe9vf Жыл бұрын
what do you mean by " "pollutes" the global namespace " ?
@BurninVinyl4 ай бұрын
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.