j'aimerais indetifier des mots dans un fichier txt. J'ouvre le fichier et je le copy dans un char (data). Ensuite je fais un test pour voir si les deux mots sont identiques.
char temoin[] = "mot";
for (int i = 0;i<taille du fichier;i++)
{
char mot_courrant[] = {data[i],data[i+1],data[i+2],'\0'}
if ( mot_courrant == temoin)
{
cout<<"eurka\n";
}
}
Le Pb c'est que la condition n'est jamais vrai. Je programme en C++ en projet console.