Can't set the string Guess to GetGuess

Expected Behaviour
When I run this it should print the game intro, and after that it should ask me 5 times to type an answer in the console and then print that answer back.

Observed Behaviour
Error message while compiling. Can’t set the string Guess to the string GetGuess
Click to see screenshot

Steps to reproduce

  1. Create new Visual Studio 2017 C++ Empty Project.
  2. Go to “Project > Properties > Linker > System > SubSystem” and then select CONSOLE.
  3. Type in my code. (Click here to see my code)
  4. Select run without debugger.

Already Tried

  1. Retyping my code into a new project.
  2. Reinstalling Visual Studio 2017.

Useful Info
Microsoft Visual Studio Community 2017 v4.7.02556
Windows 10 Pro 64-bit
Click to see my code
Click to see screenshot

Hello,

Please take a look at line 37 of your program. You are missing the round brackets when calling the function. The correct syntax is Guess = GetGuess();

Hope this helps.

Privacy & Terms