array
is a slightly misleading name. For a dynamically allocated array of pointers, malloc
will return a pointer to a block of memory. You need to use Chess*
and not Chess[]
to hold the pointer to your array.
Chess *array = malloc(size * sizeof(Chess));
array[i] = NULL;
and perhaps later:
/* create new struct chess */
array[i] = malloc(sizeof(struct chess));
/* set up its members */
array[i]->size = 0;
/* etc. */