declared ‘static’ but never defined|
Bonjour , j'ai une erreur dans mon code lors de la compilation :
: ‘CalculerFreq’ declared ‘static’ but never defined|
Code:
static int CalculerFreq(ChainonMot const *pcMot);
Des idées?
Merci
format ‘%d’ expects type ‘int’, but argument 3 has type ‘double’|
Bonsoir,
J'ai une erreur de compilation qui s'affiche format ‘%d’ expects type ‘int’, but argument 3 has type ‘double’|
à ce niveau
Code:
fprintf(fout,"%d \n",im);
je vois pas pourquoi il n'accepte pas le type double dans ce cas (je vais avoir des chiffre de ce genre : 0.000000000058)
Une idée?
Code:
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
|
void TraiterCoupleMots(ChainonMot const *pc, ChainonMot const *pc2,FILE *fout,int nbligne)
{
ChainonCoord const *pcCoord;
ChainonCoord const *pcCoord2;
double im=0;
int nblignes;
int LC=0;
for(pcCoord = coord_GetPremierC(GetPtrCoordC(pc)) ; pcCoord!=NULL ; pcCoord=coord_GetNextC(pcCoord))
{
for(pcCoord2 = coord_GetPremierC(GetPtrCoordC(pc2)) ; pcCoord2!=NULL ; pcCoord2=coord_GetNextC(pcCoord2))
{
if((GetLigne(pcCoord2)==GetLigne(pcCoord)))
{
//Ŝ fprintf (fout,"anneen");
fprintf(fout, "%s ", GetMot(pc));
fprintf(fout,"->");
fprintf(fout,"%s \n", GetMot(pc2));
LC=nbrLignesCommunes(pc,pc2);
im=info_mut(pc,pc2,nblignes);
fprintf(fout,"%d \n",im);
}
}
}
} |
Code:
1 2 3 4 5
| double info_mut(ChainonMot const *pc, ChainonMot const *pc2,int nblignes)
{
int IM=0;
IM=nbrLignesCommunes(pc,pc2)*log(nbrLignesCommunes(pc,pc2));
} |
Merci
recuperer un pointeur (structure de type chainon)
Bonsoir
J'ai une erreur de compitation au niveau de ma nouvelle focntion qui pour une chaine de caractere determine le pointeur apporprié,
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| ChainonMot * permutCharToChainon(char *m,TableHachageMot *t)
{
int i,j;
for( i=0;i<TAILLEHASH;i++)
{
for(j=0;j<TAILLEHASH;j++)
{
ChainonMot const *pc2;
ChainonMot const *pc;
for(pc2=GetPremierC(&t[i][j]) ; pc2!=NULL ; pc2=GetNextC(pc2))
{
if(GetMot(pc2)==m)
{
pc= pc2;
}
break;
}
}
}
return pc2;
} |
erreur:
erreur: ‘pc2’ undeclared (first use in this function)
erreur: (Each undeclared identifier is reported only once|
je vois pas pourquoi il reconnair pas pc2 bien qu'elle est bien déclarée
Merci