+ 3

CAN SOMEONE EXPLAIN TO ME THIS?

#include <iostream> using namespace std; int x; int main() { int x; cout<<"global x is "<<::x<<endl; cout<<"local x is "<<x<<endl; return 0; } //why global x is 0 and local x is the garbagy thing?

17th Dec 2017, 7:05 PM
Mind To Machine 💻🕆
Mind To Machine 💻🕆 - avatar
1 Réponse