title: create a Dynamic std::array of std::array
body: <p>My task requires me to create an array of arrays to store some data , where the number of row is fixed and the columns are to be decided at run-time.</p>
  
  <p>If I was using a simple int array then this would've been a simple task but because I have to use std::array , I am lost .</p>
  
  <p>My attempt so far</p>
  
  <pre><code>#include&lt;iostream&gt;
  #include&lt;array&gt;
  using std::array;
  int main(){
    array&lt;array&lt;int,1&gt;*,3&gt; x;
    for(size_t i=0;i&lt;3;i++)
        {
          x[i][0]=array&lt;int,3&gt;;
        }
  }
  </code></pre>
  
  <p>which leads to the error </p>
  
  <blockquote>
    <p>array1.cpp:12:29: error: expected '(' for function-style cast or type
          construction
            x[i][0]=array;
                    ~~~~~~~~~~~~^ 1 error generated.</p>
  </blockquote>
  
  <p>when using clang++</p>
  
  <p>I have read that an std::array is equivalent to a normal array , 
  I know i can use vectors but since i know how many rows i have from the beginning , I feel it to be a waste to use vectors , while I would love the added functionality of std::array when compared to a traditional array. How do I implement this .</p>