I have a very basic question about namespace
when should I use "using namespace A::B
"?
I know I shouldn't use it in header files, how about .cpp file? In my test.cpp
:
namespace A{
namespace B{
namespace C{
A::B::Object obj = ....
}
}
}
the full namespace is A::B::Object
as I have right now, Do I actually need A::B
? Can I just have Object obj = ....
? Should I use using namespace A::B
and then have Object obj = ....
? I am not sure what this actually means:
namespace A{
namespace B{
namespace C{
.....
}
}
}
I know This means all the contents inside it will have namespace A::B::C
, but does it also mean:
using namespace A
using namespace A::B
using namespace A::B::C
implicitly for the contents inside it?