<p>When using C++ namespaces, do you prefer to explicitly name them, like this:</p>

<pre><code>std::cout &lt;&lt; "Hello, world!\n";
</code></pre>

<p>Or do you prefer <code>using namespace</code>:</p>

<pre><code>using namespace std;
cout &lt;&lt; "Hello, world!\n";
</code></pre>

<p>And if if you prefer the latter, do you declare your usings at file or function scope?</p>

<p>Personally I prefer to explicitly name them - it's more typing but when using a mixture of namespaces (e.g. <code>std</code> and <code>boost</code>) I find it more readable.</p>

I always use
```
using namespace
```
for std & boost. Everything else I tend to use an explicit namespace unless it is used so much that it would clutter up the code.
In headers, I never use
```
using namespace
```
to avoid polluting the global namespace of the #including source.