title: What is the efficient way to populate vector from vector of vector?
body: <p>I have a vector of vector like <code>std::vector&lt; std::vector&lt; int&gt; &gt;</code> and  from this vector I want to populate <code>std::vector&lt; int&gt;</code>, can you please tell me efficient way to do this? There might be some boost feature which I can use. I am using VS2010. Below code snippet is what I tried:</p>
  
  <pre><code>std::vector&lt;std::vector&lt;int&gt; &gt;::iterator outereItr = vecOfVec.begin();
  
  while(outereItr != vecOfVec.end()) 
  {
      std::vector&lt;int&gt;::iterator innerItr1 = (*outereItr).begin();
      while(innerItr1 != (*outereItr).end())
      {
          masterVec.push_back(*innerItr1);
          ++innerItr1;
      }
      ++outereItr;
  }
  </code></pre>