Home Why is "using namespace std" considered bad practice?
Reply: 0

Why is "using namespace std" considered bad practice?

user444
1#
user444 Published in July 21, 2018, 6:11 am

I've been told by others that writing using namespace std in code is wrong, and that I should use std::cout and std::cin directly instead.

Why is using namespace std considered a bad practice? Is it inefficient or does it risk declaring ambiguous variables (variables that share the same name as a function in std namespace)? Does it impact performance?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.579958 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO