I tried to take the loops to what’s going to come in the next lessons and went and tried to nest for loops to check each character against each other. It worked on my side with the following code in the IsIsogram() function:
bool UBullCowCartridge::IsIsogram(FString Word) const
{
for (int32 j = 0; j < Word.Len(); j++) // 1st round check for each letter
{
for (int32 l = 0; l < Word.Len(); l++) // 2nd round check for each letter
{
if (Word[j] == Word[l] && j!=l) // comparing each letter against each other
{ // but excluding comparisons between same index numbers.
return false;
}
}
}
return true;
}
don’t know if this approach would be problematic or functional.
thanks!