What is the difference among IsIsogram(word),IsIsogram.word and IsIsogram[word]

what is the difference between IsIsogram(word) , IsIsogram.word and IsIsogram[word]?So confused about it.

IsIsogram(word)

This is calling a function passing in word as an argument e.g.

bool IsIsogram(FString Word); // function declaration

void SomeFunction()
{
    const FString ShortWord = TEXT("patch");
    const bool bIsWordIsogram = IsIsogram(ShortWord);
}

IsIsogram.word

That is accessing a member of some type. e.g.

struct Example
{
    FString word;
};

void SomeFunction()
{
    Example E;
    E.word;
}

IsIsogram[word]

This doesn’t quite make sense. The subscript operator accesses an array at a given index.

const int32 SomeArray[] { 1, 2, 3, 4 };
const int32 Value2 = SomeArray[1]; // access second element. Index starts at 0

thank you

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms