My apologies if this has been brought up here before.
Here is my sample code, class.cpp
1 2 3 4 5 6 7
staticint xx;
namespace app{
class yy{};
}
My questions is what is the scope of xx here? Is it any difference than the one without namespace app{}? Possible answer:
1. xx is global (probably not)
2. only object from yy can see xx
What about the zz in this one?
1 2 3 4 5 6 7 8
staticint xx;
namespace app{
staticint zz;
class yy{};
}