title: C++ forward declaration problem
body: <p>I have a header file that has some forward declarations but when I include the header file in the implementation file it gets included after the includes for the previous forward declarations and this results in an error like this.</p>
  
  <pre><code>error: using typedef-name ‘std::ifstream’ after ‘class’
  /usr/include/c++/4.2.1/iosfwd:145: error: ‘std::ifstream’ has a previous declaration.
  
  class ifstream;
  
  class A
  {
      ifstream *inStream;
  }
  // End of A.h
  
  #include &lt;ifstream&gt;
  using std::ifstream;
  
  #include "A.h"
  
  // etc
  </code></pre>
  
  <p>Whats the norm for working around this?</p>
  
  <p>Thanks in advance.</p>