Code:
#define MAX_FLARES 32

typedef struct _FLARE
{ 
  int count;
  ENTITY **ents;
} FLARE;

FLARE *flares = 0;

...

flares = (FLARE*)malloc(sizeof(FLARE) * MAX_FLARES);
if(!flares) //errorhandling

int i;
for(i = 0; i < MAX_FLARES; i++)
{
  flares[i].count = 64;
  flares[i].ents = (ENTITY**)malloc(sizeof(ENTITY*) * flares[i].count);
  if(!flares[i].ents) //errorhandling

  flares[i].ents[0] = ent_create(..);
}



To enlarge the array(s) use realloc

Last edited by Ch40zzC0d3r; 01/02/17 12:26.