![]() |
|
#1
|
|||
|
|||
Hangman Game - Need Help!!I need to improve below program interface, store a list of words in a file and read the words randomly for each game the player guess. Anyone can help? TQ.
CPP / C++ / C Code:
Last edited by LuciWiz : 11-Oct-2006 at 00:12.
Reason: Please insert your C/C++ code between [cpp] & [/cpp] tags
|
|||
|
#2
|
||||
|
||||
Re: Hangman Game - Need Help!!I can think of two things:
1. read the file (yours, or one the user can provide) into a vector, and then randomly choose one of the vector entries. This avoids re-reads on the file, and to limit the user's file size, either limit the vector size and/or the size of the file. 2. (maybe overkill) a database interface that queries a random record [word] from a table. (maybe others will offer more ideas) __________________
Use the force...read the source!! WYCIWYG -- what you code is what you get! |
Recent GIDBlog
Not selected for officer school by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Looking for opinions | crystalattice | Miscellaneous Programming Forum | 6 | 27-Sep-2006 21:02 |
| Thoughts on Software Piracy | pcxgamer | Computer Software Forum - Games | 9 | 23-Apr-2004 06:36 |
| want to add a pause in a game. Help | jjj93421 | C++ Forum | 1 | 11-Feb-2004 09:33 |
| Trying to create the game of life | warny_maelstrom | C Programming Language | 10 | 21-Jan-2004 21:14 |
| Tips for game troubleshooting | pcxgamer | Computer Software Forum - Games | 0 | 02-Jan-2004 05:27 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The