I am making a wheel of fortune game and have successfully figured out how to change the word that you're trying to guess into astricks *. However, I cannot figure out how to change it back once the user inputs a correct letter.
The puzzle comes from the user inputting a file name previously in the code.
Here is my code for this segment so far:
for (int counter = 0; counter < phrase.length(); counter++)
{
if (phrase[counter] = puzzle[counter])
puzzle[counter] = phrase[counter];
cout << "PUZZLE: " << phrase << endl; // for debugging purposes
}
cout << "PUZZLE: " << phrase << endl; // for debugging purposes
Can you please help clear up for me where I am going wrong?
Thank you so much for your time.