title: C++ matrix size depending input doesn't compile
body: <p>there is a topic about this subject which is working with arrays but I can't make it work with matrices.</p>
  
  <p>(Topic: <a href="https://stackoverflow.com/questions/312116/c-array-size-dependent-on-function-parameter-causes-compile-errors">C++ array size dependent on function parameter causes compile errors</a>)</p>
  
  <p>In summary: </p>
  
  <pre><code>  long rows, columns;
    cin &gt;&gt; rows &gt;&gt; columns;
    char *a = new char [rows];    
  </code></pre>
  
  <p>compiles great in visual studio, but:</p>
  
  <pre><code>  char **a = new char[rows][columns]; 
  </code></pre>
  
  <p>or</p>
  
  <pre><code>  char *a[] = new char[rows][columns];
  </code></pre>
  
  <p>or</p>
  
  <pre><code>  char *a[] = new char[rows][columns]();
  </code></pre>
  
  <p>or</p>
  
  <pre><code>  char **a = new char[rows][columns]();
  </code></pre>
  
  <p>don't compile at all.</p>
  
  <p>Any help? Thank you</p>