in my FBullCowGame.cpp file, at the top, I define:
#define TMap std::map;
But I can’t use in in the function:
bool FBullCowGame::GuessIsIsogramHash(FString Guess) const
{
// treat 0 & 1 letter words as isograms
if(Guess.length() < 2)
{
return true;
}
// This line reports a code issue:
// "Expected '{' for function style case or type construction
TMap<char, bool> LetterSeen;
// But I can write:
std::map<char, bool> LetterSeen2;
Find the definition of #define somewhere or in the Lecture example and see what the punctuation is. Hint - the #define takes everything after the TMap name as what is substituted for TMap anywhere in the code. It does not use C++ punctuation. It just eats everything until there is no line left (ignoring leading and ending spaces).
If this is not clear, substitute it by hand and see what doesn’t work. Look very closely.
Nice catch. I thought that in the video they should have noted the lack of a semi colon at the end of the definition. I just finished this video though so not sure if they mention it in any of the later videos.