usingnamespace std; dumps everything in namespace std into global namespace. Its intended use was to allow easy compatibility for old pre-namespace programs.
Where should it be used?
Almost never. If you have good reasons, better use it in the least possible scope. Even than prefer bringing concrete entities as opposed to everything. But NEVER use it in headers.
Main problem with usingnamespace std; is that it brings everything in global scope. And standard library uses many names you probably can use in your code. This often leads to errors when used in something other than 100-lines school assigments. To make matter worse, you might only run into poblems when you need to include another standard header, or switch compilers, or even update your compiler.