title: Header files and include best practice
body: <p>I have a quick question regarding header files, include statements, and good coding style.  Suppose I have 2 classes with associated source and header files, and then a final source file where main() is located.</p>
  
  <p>Within Foo.hpp I have the following statements:</p>
  
  <pre><code>#include &lt;string&gt;
  #include &lt;iostream&gt;
  #include &lt;exception&gt;
  </code></pre>
  
  <p>Now withing Bar.hpp I have the following statements:</p>
  
  <pre><code>#include "Foo.hpp"
  #include &lt;string&gt;
  </code></pre>
  
  <p>And finally withing Myprogram.cpp I have the following statements:</p>
  
  <pre><code>#include "Bar.hpp"
  #include &lt;string&gt;
  #include &lt;iostream&gt;
  #include &lt;exception&gt;
  </code></pre>
  
  <p>I know the include statements in &lt;> in Myprogram.cpp and Bar.hpp aren't necessary for the program to compile and function, but what is the best practice or right way of doing things?  Is there any reason to not explicitly include the necessary header files in each file?</p>