The first level pointer will point to an array of pointers, and each second level pointer will point to a Yyy array.
They can be configured as follows:
struct Yyy **makeMatrix(int rows, int cols) { int i; struct Yyy **result = malloc(rows*sizeof(struct Yyy *)); for (i = 0; i < rows; i++) { result[i] = malloc(cols*sizeof(struct Yyy)); } return result; }
dbush source share