title: Organize includes
body: <ul>
  <li>Is there some preferred way to organize ones include directives?  </li>
  <li>Is it better to include the files you need in the <code>.cpp</code> file instead of the <code>.h</code> file? Are the translation units affected somehow?   </li>
  <li>How about if I need it in both the <code>.h</code> file and <code>.cpp</code> file, should I just include it in the <code>.h</code> file? Will it matter?  </li>
  <li>Is it a good practice to keep the already defined files in a precompiled header (<code>stdafx.h</code>), for instance std and third party libraries? How about my own files, should I include them in a <code>stdafx.h</code> file along the way as I create them?  </li>
  </ul>
  
  <hr>
  
  <pre><code>// myClass.h
  #include &lt;string&gt;
  // ^-------- should I include it here? --------
  
  class myClass{
      myClass();
      ~myClass();
  
      int calculation()
  };
  
  // myClass.cpp
  #include "myClass.h"
  #include &lt;string&gt;
  //  ^-------- or maybe here?  --------
  
  [..]
  
  int myClass::calculation(){
      std::string someString = "Hello World";
      return someString.length();
  }
  
  
  // stdafx.h
  #include &lt;string.h&gt;
  // ^--------- or perhaps here, and then include stdafx.h everywhere? -------
  </code></pre>