title: How to correctly fill 2D array in C++ using user input?
body: <p>I am trying to make a 2D array in C++ and fill it with user input, but once I start typing in values the program just stops giving me "Process finished with exit code -1073741819 (0xC0000005)" </p>
  
  <pre><code>double ** array = new double*[col];
  for( i=0;i&lt; col; i++){
      array[i] = new double [row];
  }
  
  
  for(i1=0;i1&lt;row;i1++){
      for(j=0;j&lt;col;j++){
          cin&gt;&gt; n;
          array[i1][j] = n;
      }
  }
  
  for(i1=0;i1&lt;row;i1++){
      cout&lt;&lt;" "&lt;&lt;endl;
      for(j=0;j&lt;col;j++){
          cout&lt;&lt; array[i1][j];
          cout&lt;&lt;" ";
  
      }
  }
  </code></pre>
  
  <p>Any ideas how to solve this?</p>