title: Replacing subvector in a vector
body: <p>I have</p>
  
  <pre><code>vector&lt;int&gt; my_vector;
  vector&lt;int&gt; other_vector;
  </code></pre>
  
  <p>with <code>my_vector.size() == 20</code> and <code>other_vector.size() == 5</code>.</p>
  
  <p>Given <code>int n</code>, with <code>0 &lt; n &lt; 14</code>, I would like to replace the subvector (<code>my_vector[n]</code>, <code>myvector[n+1]</code>, ..., <code>myvector[n+4]</code>) with <code>other_vector</code>. </p>
  
  <p>For sure with the stupid code</p>
  
  <pre><code> for(int i=0; i&lt;5; i++)
   {
        my_vector[n+i] = other_vector[i];
   }
  </code></pre>
  
  <p>I'm done, but I was wondering if is there a more efficient way to do it. Any suggestion?</p>
  
  <p>(Of course the numbers 20 and 5 are just an example, in my case I have bigger size!)</p>