Im trying to create a hangman game witch im successful at that but one thing. I can't figure out how to make input not show just for one string. so this is what I have
1 2 3 4
cout << "Welcome to Hangman!\n";
cout << "Enter a word: ";
string word;
cin >> word;
So when I run it says
Welcome to Hangman!
Enter a word: Hangman
I typed Hangman into the "Enter a word: " it shows the word I want the input to not show.
Sorry i put so much detail in this people usually say I need more so I listened
The hiding of characters is an OS thing and doesn't happen by default.
Depending on wheher you are using *nix or windows, here are some examples I pinched from
codeguru forum:
Neither version cleans up after itself. Make sure to restore the terminal state before you terminate. (I would restore it immediately after getting the word.)