Bonjour
J'ai de nouveau une erreur de segmentation dans cette fonction GenererLesRegles1fren:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 void DoubleParcoursTablefren(FILE *pfOut, MotCompact const pcMots1[],MotCompact const pcMots2[],size_t nbmot1) { size_t iMot1,iMot2; for(iMot1=0 ; iMot1<nbmot1 ; iMot1++) { for(iMot2=0 ; iMot2<100 ; iMot2++) { GenererLesRegles1fren(pcMots1+iMot1,pcMots2+iMot2); } } putchar('\n'); }Une idée svp?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33 void GenererLesRegles1fren(MotCompact const *pcLeft, MotCompact const *pcRight) { size_t iLigneLeft = 0; size_t iLigneRight = 0; int const * pcCoordLeft = ligne_GetPremierC(pcLeft, &iLigneLeft); int const * pcCoordRight = ligne_GetPremierC(pcRight, &iLigneRight); while(pcCoordLeft!=NULL && pcCoordRight!=NULL) { { int ligneRight = *pcCoordRight; while(pcCoordLeft!=NULL && (*pcCoordLeft)>ligneRight) pcCoordLeft = ligne_GetNextC(pcLeft, &iLigneLeft); } if(pcCoordLeft==NULL) break; { int ligneLeft = *pcCoordLeft; while(pcCoordRight!=NULL && ligneLeft<(*pcCoordRight)) pcCoordRight = ligne_GetNextC(pcRight, &iLigneRight); } if(pcCoordRight==NULL) break; if(*pcCoordLeft == *pcCoordRight) { printf("sss"); pcCoordLeft = ligne_GetNextC(pcLeft, &iLigneLeft); pcCoordRight = ligne_GetNextC(pcRight, &iLigneRight); } } }
merci
Partager