title: Pass a std container to a function
body: <p>I came up with the following:</p>
  
  <pre><code>template &lt;typename T&gt; inline void printcontainer( std::vector&lt;T&gt; container )
  {
      for( auto it = container.begin(); it != container.end(); it++ )
      {
          std::cout &lt;&lt; *it &lt;&lt; std::endl;
      }
  }
  
  
  int _tmain(int argc, _TCHAR* argv[])
  {
      std::vector&lt;int&gt; v;
      v.push_back(5);
      v.push_back(4);
      v.push_back(3);
      printcontainer(v);
  
      return 0;
  }
  </code></pre>
  
  <p>(Sorry for the <code>push_backs</code>, visual studio doesn't accept initializer lists...ugh!!)</p>
  
  <p>now this function is limited to <code>std::vector</code>, how can I make it so that I can pass other containers, like <code>std::list</code> arrays etc...</p>