I have this type of array: char ArrayPalavra[100][200];
And i'm feeding like that:
pchPalavra = strtok(palavras," ");
while (pchPalavra != NULL)
{
tamanhoArrayPalavra++;
strcpy(ArrayPalavra[i++], pchPalavra);
pchPalavra = strtok (NULL, " ");
}
I'm writing this array with words, like "this", "is", "a", "test". The problem is, if i put that array in a for for comparison with a word, that dont match.
for(int i = 0; i < tamanhoArrayPalavra; i++)
{
if("this" == ArrayPalavra[i])
{
printf("Work!");
}
}
But in test, if i print the ArrayPalavra[i], they come with "this". why using iteration doenst work ? I'm using C language.