Problem with getting guess from user

#include
#include

using namespace std;

int main()
{
//Introduce the game
constexpr int WORLD_LENGHT = 5;
cout << “Welcome to Bulls and Cows, a simple word game.\n” ;
cout << “Can you guess the " << WORLD_LENGHT;
cout << " letter isogram I’m thinking of?\n”;
cout << endl;
return 0;

//Get guess from the player
cout << "Enter your guess: ";
string Guess = "";
cin >> Guess;

//Repeat guess back to them
return 0;

}

It doesn’t have place to write guess from user it just ignores that part below
//Get guess from the player
cout << "Enter your guess: ";
string Guess = “”;
cin >> Guess;

//Repeat guess back to them
return 0;

}

http://prntscr.com/k3m7kg this is what I get
sorry for bad formating

If I’m reading your code right that ‘return 0’ above is killing the program before you allow a user input and so should be removed

Regards

Keith

1 Like

That solved it thank you

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.