Hello, I was wondering if someone could please point out the incorrect use of syntax below, I want to create a pointer to an array of structs and then malloc that amount of memory....I currently have:
Particle *pParticle[MAX_NUMBER_PARTICLES];
pParticle = (Particle*)(malloc(MAX_NUMBER_PARTICLES * sizeof(Particle)));
Should I use a type of loop to malloc each array element in turn instead?
Thanks again.