title: Array pointer to 2d array c++
body: <p>I have N number of 2d(column,row) arrays. Thus I am trying to create an array pointer of size N each pointing to the respective 2D array. The code goes like.</p>
  
  <pre><code>int col = 3,row = 2,N =2;
  float blue[][row] = {1,2,3,4,5,6}; // 2d array (for N=1)
  float green[][row] = {1,2,3,4,5,6}; // 2d array (for N=2)
  float (*arry_ptr[N])[col][row]; // this works
  </code></pre>
  
  <hr>
  
  <pre><code>arry_ptr[0]= &amp;blue;  // trying to point the 1st pointer to 1st 2d array
  arry_ptr[1]= &amp;green;  // trying to point the 2nd pointer to 2nd 2d array
  </code></pre>
  
  <hr>
  
  <p>I know that the last two lines of code are not appropriate and it does throw error. Is there any solution to increment the pointer and make it point to the 2d arrays in sequential order and NOT like in the below line.</p>
  
  <pre><code>float (*arry_ptr[N]) ={a,b}  // this works but i can allocate only single 2d array at a time.
  </code></pre>