title: Can't declare dynamic 2D array in C++
body: <p>I've stuck on a problem - I can't declare 2D arrays in C++ using integers, written by user.</p>
  
  <p>This code works fine-</p>
  
  <pre><code>cin&gt;&gt;m&gt;&gt;n;
  int *array;
  array=new int[m*n];
  </code></pre>
  
  <p>But I can't make this work -</p>
  
  <pre><code>cin&gt;&gt;m&gt;&gt;n;
  int *array;
  array=new int[m][n];
  </code></pre>
  
  <p>Any ideas how i can bypass it?
  P.S. the error : cannot convert 'int (<em>)[2]' to 'int</em>' in assignment.</p>