I don't understand when to use the arrow and when to use the point.
For example,
void scrivi_file(FILE *output, anagrafe *vect, anagrafe **max, int dim_vect){
int i;
*max = malloc(1 * sizeof(anagrafe));
max[0] = &vect[0];
for(i=1; i<dim_vect; i++)
if(vect[i].media > max[0]->media)
max[0] = &vect[i];
fprintf(output, "%s %s %f", max[0]->cognome, max[0]->nome, (*max)[0].media);
}
Why is the last max with the point and the first two with the arrows? I don't get it. The asterisks and the & are also pretty confusing.