As we’re not planning to update our list, I used a regular array and placed it inside header file as it’s not too big anyway. Mine is 8 words long:
class BULLCOWGAME_API UBullCowCartridge : public UCartridge
{
// ...
private:
const FString HiddenWords[8] = {
TEXT("car"), TEXT("row"),
TEXT("duck"), TEXT("game"),
TEXT("chair"), TEXT("table"),
TEXT("flower"), TEXT("change")
};
// ...
}
Noticed that I needed to provide array length right away. Without it the code wouldn’t compile