I am a PHP developer with some Java background and I am wondering about the scope of various functions.
During the challenge of the constructor, I came up with
FBullCowGame::FBullCowGame() {
FBullCowGame::Reset();
}
In the video it was just Reset(); without “FBullCowGame::” in front of it. While I see that it indeed works just as fine, I am wondering why that is. In PHP/Java I would go for something like
this.Reset();
but never just type the function name.
The same of course applies to the getter functions, I thought, it should be something like
return this.MyMaxTries; //or
return FBullCowGame.MyMaxTries;
Would it be better style to include the class name or is it redundant because we are inside FBullCowGame.cpp?