Player Guess looped. code and console screenshots

Hi there here is the code ive written to get the following result in the screenshot below:

  #include <iostream>
  #include <string>
 using namespace std;
  int main() {
//introduce the game
constexpr int WORDLENGTH = 5;
string Guess ="";
cout << "Welcome to Bulls and Cows, a fun game about words...\n";
cout << "Can you guess the " << WORDLENGTH << " isograms word i've chosen ?\n";
//Get a guess from the user repeat and give the results back to the users
do {
	cout << "Enter your guess: ";
	cin >> Guess;
	cout << "Your guess was: " << Guess << endl;
} while (true);

return 0;

Thank you.

Privacy & Terms