basic c++
This is a simple implementation of the classic Hangman game in C++.
- The game chooses a secret word at random.
- The player is shown a series of dashes representing the secret word.
- The player guesses a letter at a time.
- If the guessed letter is in the word, the dashes are replaced with the guessed letter in the correct positions.
- If the guessed letter is not in the word, the player loses a try.
- The game continues until the player guesses the word correctly or runs out of tries.
To compile the game, use a C++ compiler like g++. Run the following command in your terminal:
g++ main.cpp -o hangman