title: Proper way to use <vector> (or any STL container) in .h and .cpp
body: <p>Let's say, I declare <code>function_x</code> by </p>
  
  <pre><code>vector&lt;int&gt; function_x(int i1, int i2);
  </code></pre>
  
  <p>in function.h, and define it by </p>
  
  <pre><code>vector&lt;int&gt; function_x(int i1, int i2) {
      vector&lt;int&gt; vec;
      vec.push_back(i1);
      vec.push_back(i2);
      return vec;
  }
  </code></pre>
  
  <p>in function.cpp.</p>
  
  <p>To use vector, I need to write <code>#include &lt;vector&gt;</code> in function.h.</p>
  
  <p>If so, I don't need to write <code>#include &lt;vector&gt;</code> in function.cpp because I put <code>#include "function.h"</code> anyway and it contains <code>#include &lt;vector&gt;</code>.</p>
  
  <p>But <strong>I feel a little weird</strong> because I use vector in function.cpp without including <code>&lt;vector&gt;</code> (directly).</p>
  
  <p>Is this a normal way to use <code>&lt;vector&gt;</code> (or any STL container)?
  Or, should I write <code>#include &lt;vector&gt;</code> in function.cpp for explicitness even if I'm sure it's unnecessary? (<code>&lt;vector&gt;</code> should have include guard)</p>