Redefinition of 'SubmitGuess' as different kind of symbol ERROR

Hey guys,

I’m getting the mentioned error when I’m trying to declare the SubmitGuess function in the FBullCowGame.cpp (IDE = Xcode) .

How do I solve this problem? (Double checked all other files)

Greetings,

Peter

What does SubmitGuess look like in your header file?

BullCowCount SubmitGuess(FString);

Okay, I deleted the FString parameter and then restored it again. Now it works as it should. But why? Could it be the defined type alias for FString ?

Probably just needed to rebuild the solution.

1 Like

I have a similar problem. Using XCode on Mac. The Errors (3) does not go away.

Error on “BullCowCount FBullCowGame::SubmitGuess(<#FString#>){”
#1 "Expected ‘;’ after top level declarator.
#2 Redefinition of “SubmitGuess” as a different kind of symbol
#3 Expected expression

I’ve done Project Clean ( clean the build folder by pressing Command+Option+Shift+K) but still a problem. Anyone else encounter this?

Could you post your code?

Hi! Actually its exactly the same as Peter_Smith1.
Alternatively is there a site where we can download the typed code? I can try running that code up to lecture 34. Thanks!

If you hit the commits button you will see the code after each lecture.

Thanks Dan! I extracted it and when I pasted that line in, it looked exactly like my typing:
Believe it or not, the bottom one compiles fine, the top one (mine) does not.

TOP: FBullCowCount FBullCowGame::SubmitGuess(<#FString#>Guess){
BOTTOM: FBullCowCount FBullCowGame::SubmitGuess(FString Guess){

When I look closer, the top one has a <# and #> enclosing it. In the editor, both lines look EXACTLY the same but when I paste it here, or if I paste it in sublime, I get to see <# and #> What is it?

Not entirely sure but I believe it’s related to Xcode? :confused:

Privacy & Terms