CatTail
6/1/2015 - 10:13 AM

Access multidimensional array through pointer

Access multidimensional array through pointer

int get(int **array, int COLUMN_SIZE, int x, y) {
    return *((int *)array + x * COLUMN_SIZE + y);
}