title: Best way to extract a subvector from a vector?
body: <p>Suppose I have a <code>std::vector</code> (let's call it <code>myVec</code>) of size <code>N</code>.  What's the simplest way to construct a new vector consisting of a copy of elements X through Y, where 0 &lt;= X &lt;= Y &lt;= N-1?  For example, <code>myVec [100000]</code> through <code>myVec [100999]</code> in a vector of size <code>150000</code>.</p>
  
  <p>If this cannot be done efficiently with a vector, is there another STL datatype that I should use instead?</p>