title: Slicing a vector in C++
body: <p>Is there an equivalent of list slicing <code>[1:]</code> from Python in C++ with vectors? I simply want to get all but the first element from a vector.</p>
  
  <p>Python's list slicing operator:</p>
  
  <pre><code>list1 = [1, 2, 3]
  list2 = list1[1:]  
  
  print(list2) # [2, 3]
  </code></pre>
  
  <p>C++ Desired result:</p>
  
  <pre><code>std::vector&lt;int&gt; v1 = {1, 2, 3};
  std::vector&lt;int&gt; v2;
  v2 = v1[1:];
  
  std::cout &lt;&lt; v2 &lt;&lt; std::endl;  //{2, 3}
  </code></pre>