Uninitialized local variable 'BullCowCount'

Hello, I got some error when I compile my project. I follow your tutorial . my
return of FBullCowCount FGame::SubmitGuess(FString) method is gives me error. I change my return from BullCowCount to FBullCowCount() code is working fine. But I guess its not true way.

FBullCowCount FGame::SubmitGuess(FString){


MyCurrentTry++;

FBullCowCount BullCowCount;


int32 HiddenWorldLength = MyHiddenWorld.length();



return BullCowCount;

}

What should I do?

I solved it. The problem was about my struct class. I forget it initialize variables.
Bull=0;
Cow=0;

Privacy & Terms