I think you need to show a little code about how you're going about this because what you're trying to explain makes no sense.
You can read from a file until you hit eof (eof bit will be set in the...