title: Converting heterogenous vector to array in C++
body: <p>I'm looking for a solution for converting a three dimensional vector into a three dimensional array.</p>
  
  <p>I could create a loop to copy the array content inside a three dimensional vector, but there is a catch: The vector is constituted of very heterogeneous 2D vectors.</p>
  
  <p>Here is the argument in the constructor of my frame:</p>
  
  <pre class="lang-c++ prettyprint-override"><code>std::vector&lt;std::vector&lt;std::vector&lt;double&gt; &gt; &gt;&amp; Mdonnees
  </code></pre>
  
  <p>The first size is not a problem, the second size is the number of lines catched in a file and the last size is always 2 (number of data for every line)</p>
  
  <pre class="lang-none prettyprint-override"><code>[quantity of datasets][quantity of lines][quantity of data/line]
  </code></pre>
  
  <p>For using the freechart function Addserie (in a XY plot), I need an array of 2D arrays so I can add the series previously got with a simple loop.
  I need to be able to get in every elements of the first dimension of this array an array like that:</p>
  
  <pre class="lang-c++ prettyprint-override"><code>double data1[][2] = {
      { 10, 20, },
      { 13, 16, },
      { 7, 30, },
      { 15, 34, },
      { 25, 4, },
  };
  </code></pre>
  
  <p>Thank you</p>