Bonjour
Voila mon problème. En C j'ai une structure ayant comme élément un pointeur sur un tableau de structures. Comment faire le malloc et comment accéder au éléments.
bien alors deja modifie un peu ta declaration pour avoir
struct My_Struct_Tab { ... };
donc pas de Mon_Tableau[100] pour le moment
puis tu fais struct My_Struct_Tab * monTableau;
monTableau = (struct My_Struct_Tab *)malloc(100*sizeof(struct My_Struct_Tab));
for (i=0; i<100; i++) {
monTableau[i].tab = (struct ST_Toto *)malloc(20*sizeof(struct ST_Toto));
}
Et au final tu pourras faire :
monTableau[50].tab[10].variable;