#include <iostream>
using std::cout;
using std::endl;
int a {1};
int main()
{
int a {2};
{
int a {3};
cout << ::a << endl;
cout << a << endl;
}
return 0;
}
the first output is 1
, it's the value of a that defined before function main()
so is there any way to output the second a
that defined in function main()
in the inner block ?
thanks!