title: My program doesn't execute because of an static value
body: <p>I have this chunk of a program that merges two arrays in one. The matter is that I got this message once the program is compiled:</p>
  <pre><code>main.cpp:20:21: error: storage size of ‘cont’ isn’t known
  </code></pre>
  <p>Why does it happen?</p>
  <p>Leave my code below:</p>
  <pre><code>int * merge(int *array_1, int *array_2, int n1, int n2)
  {
  static int cont[n1 + n2];
  
  int i = 0, j = 0, k = 0;
  
  while(i &lt; n1 &amp;&amp; j &lt; n2)
      if(array_1[i] &lt; array_2[j])
          cont[ k++ ] = array_1[ i++ ];
      else
          cont[ k++ ] = array_2[ j++ ];
          
  if(i == n1)
      for(int index = j; index &lt; n2; index++)
          cont[ k++ ] = array_2[ index ];
  else if(j == n2)
      for(int index = i; index &lt; n1; index++)
          cont[ k++ ] = array_1[ index ];
  
  for(int i = 0; i &lt; k; i++)
      printf(&quot;%d &quot;, cont[i]);
  
  return cont;
  }
  </code></pre>