Global scoped variables can be accessed within a function using the :: operator. Since global scopes dont have a name, the left of :: could be empty. How will I access a variable defined in a function scope which is later overridden in a block within the function itself. In the following code, how will i access the variable initialised to 1 ?
extern int reused = 0;
int main()
{
int reused = 1;
{
int reused = 2;
cout << reused << endl; // how to get the reused inited to 1 here?
}
}