Question: Problem is in C++ resources/hangman.dat Note: resources/hangman.dat can change and be modified outside of the program. No assumptions can be made in your program regarding
Problem is in C++
resources/hangman.dat
Note: resources/hangman.dat can change and be modified outside of the program.
No assumptions can be made in your program regarding the words in the file.
The words will always be separated on lines by themselves with NO spaces and NO special symbols.
The file will end in a blank line to keep the pattern of the file:
word1
word2
word3
REQUIRED Additional Header and Source Files:
randword.h and randword.cpp
Utilizing the 2 functions written for you, call these functions in main to perform the tasks outlined.
These functions & files CANNOT be ALTERED!
Utilize the resource file and additional header and source files noted above for Topic 4 & 5. Update the program so that the wordToGuess is random.
The game is still being played as a single game in which the player CANNOT win yet.
Read all the words from the file resources/hangman.dat using the randword functions provided to you in randword.h and randword.cpp - Do NOT ALTER these functions or code in ANY WAY!
All the words are read once at the start of the program by calling the randword function: readWordsFromDataFile(fileName)
The single game play will be played with:a random word being generated from the datafile 'resources/hangman.dat'
wordToGuess is generated by calling the randword function getGameWord()
'wrongGuesses' start at 0 until the game is lost when 'wrongGueses == 6'
Convert the wordToGuess to all uppercase and display to player.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
