Thursday 18 April 2019

c++ - Why is std:: used by experienced coders rather than using namespace std;?


Possible Duplicate:
Why is 'using namespace std;' considered a bad practice in C++?






The other day when I asked a question someone replied saying if someone asks a question, show them the right way to do it instead of using namespace std; which I thought was a bit weird, as using namespace std; is way easier, But I guess I'm failing right now as I am a 'beginner' coder and you guys know better.




So I guess my question is:
Why std:: instead of using namespace std;?



Thanks.

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...