The whole point of the namespace will fail when you say " using namespace ".
So take it and use namespaces. If you want to use the using directive, put it in main:
int main() { using myCustomizations::OneMoreClass;
Understand what using directives do. You essentially have this:
namespace foo { struct baz{}; } namespace bar { struct baz{}; } using namespace foo; // take *everything* in foo and make it usable in this scope using bar::baz; // take baz from bar and make it usable in this scope int main() { baz x; // no baz in this scope, check global... oh crap! }
One or the other will work, and also put it in the main area. If you find that the namespace is really tedious, enter an alias:
namespace ez = manthisisacrappilynamednamespace; ez::...
But never use using namespace in the header and probably never in the global scope. This is good in local areas.
source share