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