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
cout << "Welcome to Hangman!\n";
cout << "Enter a 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
Last edited on
Ok ill try that and then reply if it works or not Thanks :)
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.)
tcsetattr(STDIN_FILENO, TCSANOW, &oldt);