Input on if I did this I/O right.

Reading text from a file. I think I did this correctly but wanted to see if someone could look over the loop and give me their two cents. I just want to make sure the approach I took would be the right way.