michaelzehe Posted August 11, 2013 Share Posted August 11, 2013 I was reading another C++ book (!) and i saw that they never used those annoying std:: prefixes for strings etc. and I saw they used a statement at the beginning that says: " Using namespace std; " So it tried it on one of the scripts in this book and it seems to work. Is there anything wrong with me putting this into the codes so I can study the flow, etc without the std:: prefixes? Thank you. Link to comment Share on other sites More sharing options...
Necuima Posted August 12, 2013 Share Posted August 12, 2013 Hi, I came across this post which might help : http://stackoverflow.com/questions/1452721/why-is-using-namespace-std-considered-bad-practice Cheers 2 Link to comment Share on other sites More sharing options...
Larry Posted August 12, 2013 Share Posted August 12, 2013 Thanks, Eric, for sharing that link! Don't think of those std:: prefixes as annoying, think of them as being precise and better programming. Link to comment Share on other sites More sharing options...
michaelzehe Posted August 12, 2013 Author Share Posted August 12, 2013 Not to argue with the Guru, but why does including the std:: prefixes make the programming more precise? Link to comment Share on other sites More sharing options...
Antonio Conte Posted August 12, 2013 Share Posted August 12, 2013 Read the stack overflow post. Link to comment Share on other sites More sharing options...
michaelzehe Posted August 13, 2013 Author Share Posted August 13, 2013 Thanks, everybody! MZ Link to comment Share on other sites More sharing options...
chalshokhi Posted February 23, 2015 Share Posted February 23, 2015 Not to argue with the Guru, but why does including the std:: prefixes make the programming more precise? Link to comment Share on other sites More sharing options...
Necuima Posted February 23, 2015 Share Posted February 23, 2015 See http://stackoverflow.com/questions/1452721/why-is-using-namespace-std-considered-bad-practice Cheers Link to comment Share on other sites More sharing options...
Recommended Posts