Possible Duplicate:
Why is 'using namespace std;' considered a bad practice in C++?
I’ve seen some code examples where people use, say, std::cout whereas in other places people will have using namespace std; at the top for simplicity instead. Which is generally preferred?
Use
std::coutto avoid any potential name clashes. If you use usingusing namespace std;you will populate your global namespace with all the std name which might conflict with classes or function names you or someone else in your team have written. This is well explained in the C++ faq lite and in SO