j'ai un souci de comparaison de chaine, voici ma fonction qui est dans un fichier.h :
je l'appelle dans mon main ainsi :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9 void remplaceCaractere(char choix, char *mot_a_deviner, char *pointeur_chaine){ int longueur_mot = strlen(pointeur_chaine); int i; for(i=0; i<longueur_mot; i++){ if ( strcmp(choix, mot_a_deviner[i]) == 0 ){ pointeur_chaine[i]=choix; } } }
voici mon message d'erreur :
Code : Sélectionner tout - Visualiser dans une fenêtre à part remplaceCaractere(choix, mot_a_deviner, etoile);
Je sais pas d'ou ça vient, mercifonction_pendu.h: In function 'remplaceCaractere':
fonction_pendu.h:18: warning: passing argument 1 of 'strcmp' makes pointer from integer without a cast
fonction_pendu.h:18: warning: passing argument 2 of 'strcmp' makes pointer from integer without a cast
Partager