title: Why the "ambigous symbol" error in VS2010 for the code below?
body: <p>This code compiles in VS2010, and I believe it does for any compiler.</p>
  
  <pre><code>#include &lt;iosfwd&gt;
  using namespace std;
  class ostream;
  int main() {}
  </code></pre>
  
  <p>The same happens with this code</p>
  
  <pre><code>#include &lt;iosfwd&gt;
  using namespace std;
  int main() { class ostream; }
  </code></pre>
  
  <p>But this code generates error C2872: 'ostream' : ambiguous symbol</p>
  
  <pre><code>#include &lt;iosfwd&gt;
  using namespace std;
  class ostream;
  int main() { class ostream; }
  </code></pre>