How should I rectify the error "reference to 'p' is ambiguous"?
<p>With the following code, I get the error:</p>

<pre>reference to 'p' is ambiguous</pre>

<p>Why is it so? How can I get rid of that? I want to get "79" as output. Could someone please throw some light. Thanks for your time!</p>

<pre><code>int p=3;
namespace {int p=7;}
namespace {int q=9;}

main()
{    
    cout &lt;&lt; p &lt;&lt; q;
}
</code></pre>
