Array of pointers
From NuclearCat's homepage
Revision as of 10:12, 7 August 2008 by Nuclearcat (Talk | contribs)
Not sure if it is right.
struct testarr {
int a;
int b;
} **macarr;
/* Allocate memory for pointers array */
macarr=malloc(sizeof(struct testarr*)*HOW_MUCH_POINTERS);
/* Allocate memory for structures */
macarr[0] = malloc(sizeof(struct testarr));
macarr[1] = malloc(sizeof(struct testarr));
