Danger of using the using namespace directive

The using namespace directive can have the effect of confusing code and decreasing readability when a function name is present in more than one namespace. To avoid this, use the using directive for specific function calls if both libraries will be used.

Either way when writing code think about reading the code in 6 months or a couple years from today to determine the best path.

Privacy & Terms