Hello
I had slow compile times, so I used the code from an other student to make it compile faster.
This code:
TArray<FString> WordList;
const FString WordListPath = FPaths::ProjectContentDir() / TEXT("HiddenWordList.txt");
FFileHelper::LoadFileToStringArray(WordList, *WordListPath);
But I have a problem with this lecture, because the code above is not global (the scope is BeginPlay()), so I cant use the variable WordList in the SetupGame() function.
Then I tried to make WordList global, but it failed:
C:\Users\MyUserName\Documents\repos\BullCowGame\BullCowGame-starter-kit\Source\BullCowGame\BullCowCartridge.cpp(8) : error C2761: 'bool FFileHelper::LoadFileToStringArray(TArray<FString,FDefaultAllocator> &,const TCHAR *,FFileHelper::EHashOptions)': redeclaration of member is not allowed
Why cant I do this?
Thanks in advance