Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questiontypedef struct cps { float val; int nb; } cps_t; affiche( cps_t * VC) { int i; printf("\n{"); for (i=0;i<2;i++) { printf("(%f,%d)",VC[i].val,VC[i].nb); } printf("}"); } main() { cps_t * VC; VC=(cps_t *)malloc(sizeof(cps_t)); VC[0].val=3.3; VC[0].nb=5; VC=(cps_t *)malloc(sizeof(cps_t)*2); VC[1].val=4.4; VC[1].nb=8; affiche(VC); getch(); }