I am trying to return a 2d array from a function. It is something like this

int *MakeGridOfCounts(void)
{
  int cGrid[6][6] = {{0, }, {0, }, {0, }, {0, }, {0, }, {0, }};
  int (*p)[6] = cGrid;
  return (int*)p;
}

I know this causes an error, need help. thanks

Edit
Report