Hello,

For this program I have to read a random phrase from a file which will contain an integer at the top describing how many phrases are in the file and then each phrase is blelow that number on a seperate line. I need to select a random phrase from the file with one function, then use another function to replace the random phrase with stars, then, after the user has input a character, replace the stars with the chosen character. I am using visual studio 2008. Any guidence would be greatly appreciated.

here is a start on you what to do:

1. Look up random access files for the function to get the word from the file (you be using seekp or seek g I can't remember)

2. as far as the stars part goes, You could setup a char array and fill it with stars. Then when the user guesses compare his/her guess to the original array if they match replace that element of the starts array with the guessed letter. (probably a better way but i'm just a quick idea to get you going.)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.