|
-
Nov 15th, 2005, 07:42 AM
#1
Thread Starter
New Member
Need Some Quick help Please!
Hey guys, I was needing some help on a portion of a program I am writing for my cs class. We are designing a hangman game. I have a lot of my functions built already and pretty much have it all undercontrol, but one thing. Before I say anything else, no I do not expect anyone to write this whole program for me, but I do need help on this one function. I need to write a function that returns a random word out of a file. I have tried using rand and srand, but can't figure out how to do this. I have my file built already with 8 words in it, however I just can't figure out how to generate a function that will pull one of these words out randomly. I would really appreciate if anyone could shed some light on this and help me figure this out. Thanks!!
JT
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|