Reading Files

Is there any way to get a specific line from a text file using f stream?
Say I have a list of names in a file and I want the 5th name
how would I go about doing that?
Thanks

You can read the file until you arrive at the 5th line.
how would I stop the reading or just take the 5th line I'm a bit confused I know how to make the program read and display all lines but I only want one line to be displayed
thanks I figured it out
Topic archived. No new replies allowed.