Raised This Month: $32 Target: $400
 8% 

Solved Read file backwards


Post New Thread Reply   
 
Thread Tools Display Modes
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 10-17-2019 , 18:24   Re: Read file backwards
Reply With Quote #11

Quote:
Originally Posted by Natsheh View Post
Hello you also could use fseek

More info from the documentation

Spoiler
I don't see how this would be any simpler than reading the file normally and then loading the menu backwards. With fseek() you can seek to the end of the file, but how are you going to then read line by line backwards?

The only other simple alternative I can think of is using read_file(), specifying line# backwards, but you would first need to determine the number of lines.

Either way, both alternatives are not as simple as what the OP chose.
__________________

Last edited by Bugsy; 10-17-2019 at 18:37.
Bugsy is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:55.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode