Error with the empty Guess MVS 2017

What I do:

  1. Start debugging (F5)
  2. Enter empty string
  3. Get Error

4.F5

  1. Get second Error

Can anybody explain this debugger behaviour?
THX

PS I have only russian version of MVS, so sorry for screenshots

It seems that we must check user input for empty string.
I put this after BullCowCount initialization in SubmitGuess function:

// check for not empty guess string

  if (Guess.empty())
	{
          std::cout << "Please try again. You can not guess if you enter an empty string!";
          std::cout << std::endl;
          return BullCowCount;
	}

Privacy & Terms