I have two struct arrays and a nested for loop. There are words that are identical in the two arrays, but strcasestr is not detecting them. I used strcasestr to also find substrings within words that are identical.
Here's a snippet of my code:
for(int itr = 0; itr < arrayItr; itr++)
{
for(int itr2 = 0; itr2 < arrayItr2; itr2++)
{
if(strcasestr(termsArraypast[itr].term, termsArrayTerms[itr2].term) > 0)
{
printf("%d %d %s\n", termsArraypast[itr].charDistance, termsArraypast[itr].termDistance, termsArraypast[itr].term);
}
}
}
Please know that all of these variables have already been declared in my program. I've just been on this portion for hours and can't figure it out. Thanks.