Const at the start vs end

what is the difference between:

bool UBullCowCartridge::IsIsogram(FString Guess)const;

and:

const bool UBullCowCartridge::IsIsogram(FString Guess);

just out of curiosity, thank you in advance.

2 Likes

The first is a const member function, meaning that the function cannot modify any members.
The second is returning a const bool which isn’t particularly useful.

6 Likes

thank you so much for the fast reply, it is really helpful.

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

Privacy & Terms