title: C++ best way to split vector into n vector
body: <p>I have a <code>std::vector&lt;std::string&gt;</code> in this vector I <code>push_back</code> string from txt file, like this :</p>
  
  <pre><code>std::string line;
  std::vector&lt;std::string&gt; path;
  while(getline(fichier, line))
  {    
     path.push_back(line);
  }
  </code></pre>
  
  <p>I would like to split path <code>vector</code> into n other <code>vector</code> of 10 line for example.
  So if size of my <code>vector</code> is 25, I want 2 other vector of 10 element and one <code>vector</code> of 5 element.</p>
  
  <p>What is the best way to do that ?</p>