title: Pass in subvector of vector into a function
body: <p>So let's say I have an </p>
  
  <pre><code>std::vector&lt;int&gt; myVector;
  </code></pre>
  
  <p>and a function </p>
  
  <pre><code>myFunction(std::vector&lt;int&gt; parameter); 
  </code></pre>
  
  <p>I want to be able to pass a subvector of myVector to myFunction without having to copy the elements over into a new vector first. Can this be done?</p>