Pointer to C++ 2D Array
<p>I'm porting some C++ code to Actionscript 3 and just had a small question I'm confused about.</p>

<p>In one function, one of the parameters is  <code>int* myPtr</code>.  myPtr is the address of an element of a 2D-Array, <code>&amp;my2DArray[x][y]</code>.  x and y are also parameters of the function.  I'm just a little bit confused with what is being accessed when the code accesses, for example, <code>myPtr[1]</code>. I think this would be the next element in <code>my2dArray</code>, but I'm not sure if this would be <code>my2DArray[x+1][y]</code> or <code>my2DArray[x][y+1]</code>.  Thanks for any help.</p>

<p>Additional info:
my2DArray is created by:    </p>

<pre><code>//initPtr is a int*, auxPtr is a int*, as is temp1
initPtr = (unsigned int *)NewPtr(
      sizeof(unsigned int) *
      X * Y);
  }

  auxPtr = initPtr ;

  for (i = 0; i &lt; X; i++) {
    temp1 = auxPtr + i * Y;
    my2DArray[i] = (short *)temp1;
  } 

unsigned char* NewPtr(
  int size)
{
  return ((unsigned char*)calloc(size, sizeof(unsigned char)));
}
</code></pre>
