something about C++ unnamed namespace.
- by Javran
#include <iostream>
namespace
{
int a=1;
}
int a=2,b=3;
int main(void)
{
std::cout<<::a<<::b;
return 0;
}
I complie it with my g++,but the output is 23,
who can explain it?
is that a way to get access to the <unnamed> namespace ::a?