title: array instead of vector of vector, push_back() of elements. c++
body: <p>I use approach of <strong>vector of vector</strong> and would like to change it into <strong>array</strong> for performance reasons. However I failed at trying to understand, how can I use array (dynamic) and push data in the end of the array, if I do not know how many data are being read during my while loop. Here snippet below. Can you please explain how to perform it on array, as <strong>push_back()</strong> is only for vector? Would be so much grateful.</p>
  
  <pre><code>std::vector&lt;vector&lt;double&gt;&gt; v1;
  while (1)
  {
      ..../* some code, break condition aswell*/
      vector&lt;double&gt; tmp;
      while ( .../*new data available*/ ) 
      {
          ...
          tmp.push_back(data);
      } 
      v1.push_back(tmp);
  }
  </code></pre>