Read it forward, store it in a reversible container, and then walk through the container backward. Or if you know the exact length of each line, you could open the file as binary and use fseek with read to get the lines in reverse. Or you could physically reverse the file before reading it. Or you could use recursion, but that's an exceptionally poor solution.
Reputation Points: 6442
Solved Threads: 1393
Bad Cop
Offline 11,807 posts
since Sep 2004