[C] Aide pour un tableau à 3 dim
Fermé
oliver91
Messages postés
51
Date d'inscription
lundi 21 mai 2007
Statut
Membre
Dernière intervention
9 septembre 2009
-
22 mai 2007 à 08:22
oliver91 Messages postés 51 Date d'inscription lundi 21 mai 2007 Statut Membre Dernière intervention 9 septembre 2009 - 22 mai 2007 à 10:19
oliver91 Messages postés 51 Date d'inscription lundi 21 mai 2007 Statut Membre Dernière intervention 9 septembre 2009 - 22 mai 2007 à 10:19
A voir également:
- [C] Aide pour un tableau à 3 dim
- Tableau croisé dynamique - Guide
- Picasa 3 - Télécharger - Albums photo
- Afficher un tableau en c - Forum C
- Le fichier contient le nombre de voyageurs dans 3 gares. dans la cellule b5, saisissez une formule qui calcule le total et se met à jour si on change une valeur du tableau. quel total obtenez-vous ? quelle formule avez-vous saisie ? ✓ - Forum Excel
- :3 emoji ✓ - Forum Loisirs / Divertissements
2 réponses
oliver91
Messages postés
51
Date d'inscription
lundi 21 mai 2007
Statut
Membre
Dernière intervention
9 septembre 2009
3
22 mai 2007 à 10:19
22 mai 2007 à 10:19
/*Création dun tableau contenant la 2e partie des prod*/
T2=(char***)malloc(cmptn*sizeof(char**));
printf("\nAvt for\n");system("pause");
for(i=0;i<cmptn;i++){
for(j=strstr(ProdTab[i],"->")+2-ProdTab[i];j<strlen(ProdTab[i]);j++){
if(ProdTab[i][j]==' '){cmpte++;
}
}
T2[i]=(char**)malloc((cmpte+1)*sizeof(char*));
for(j=strstr(ProdTab[i],"->")+2-ProdTab[i];j<strlen(ProdTab[i]);j++){
if(ProdTab[i][j]!=' '){
cmptm++;
}
T2[i][j]=(char*)malloc((cmptm+1)*sizeof(char));
T2[i][j][k]=ProdTab[i][j];
T2[i][j][cmptm]='\0';
}
}
Voilà, en espérant que tu puisses m'aider ...
fiddy
Messages postés
11069
Date d'inscription
samedi 5 mai 2007
Statut
Contributeur
Dernière intervention
23 avril 2022
1 816
22 mai 2007 à 09:44
22 mai 2007 à 09:44
Oui, commence par envoyer ton code stp, histoire de voir où tu en es.