title: resize 2D dynamic allocated
body: <p>can you help me change the size of dynamic allocated 2D array. I need function witch change current array size for required size. I send my code for example. Thanks</p>
  
  <pre><code>    int main()
      {
          //create array col x row
          int **array = new int*[col];
          for (int i = 0; i &lt; col; i++)
          {
              array [i] = new int[row];
          }
  
          //add numbers to array
          for (int i = 0; i &lt; col; i++)
          {
              for (int j = 0; j &lt; row; j++)
              {
                  pole[i][j] = i*j;
              }
          }
  
          /*
          call function for change size of matrix ...
          for example row to rov+5 and col to col+1 without loss of data
          */
  
          //free memory
          for (int i = 0; i &lt; col; i++)
          {
              delete[] pole[i];
          }
          delete pole;
      }
  
      void resize(int ** &amp; arr)
      {
          //code
      }
  </code></pre>