Problem with "for" loop

Expected behaviour:
It’s suppose to run 5 times using a for loop
Obeserved behaviour

  • Doesn’t show any errors nor warnings
  • Ignores completely the function GetGuessAndPrintBack(), and of course the for loop as well
    Steps to reproduce
  • Followed Ben’s steps until he uses “for” (I haven’t had any problems with Ben’s code until he used the “for” loop)
  • Select run without debugger
    Already tried
  • Restart pc
  • Reinstall Visual Studio
  • Make a new project (copying the code and retyping)
  • Change the type “string GetGuessAndPrintBack()” (code) into “void GetGuessAndPrintBack()” (code) (making sure the word string it’s changed everywhere)
  • Restart pc (again)
    -Visual Studio Still doesn’t show any errors not even a warning
    Useful info
    Visual Studio 2017 version: 15.2
    Windows 10

Inside the for loop, i put
string GetGuessAndPrintBack();
the word string shouldn’t be there just
that was the problem, the funny thing is that visual doesn’t recognise this as an error, even though it’s an amateur one. Cheers everyone

Glad to see that you have figured it out on your own! Good eyes!

Jajajaja thanks mate, very silly mistake, took me 40minutes to realise what
was wrong

Privacy & Terms