I have to do a program (like hangman) which will need to randomly select a word from a file.
I have no idea of how to do this and is the only part of the program i cannot do.
Any advice will be greatly recieved.
I have to do a program (like hangman) which will need to randomly select a word from a file.
I have no idea of how to do this and is the only part of the program i cannot do.
Any advice will be greatly recieved.
Create your file as a randomly access text file, then use the fseek() function with a randomly generated number to seek out a random bit location and get the word thats there. Pretty easy.
The keyboard is the standard device used to cause computer errors!