Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Reading Various Sections of a File
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Archi




PostPosted: Thu Jul 17, 2003 4:04 pm   Post subject: Reading Various Sections of a File

I'm wanting to make an in-game tutorial that reads from the help file. But I don't want to make various help files for the various things. Is there a way to set a trigger in the help text file much like you can set anchors in html?
Sponsor
Sponsor
Sponsor
sponsor
AsianSensation




PostPosted: Thu Jul 17, 2003 6:01 pm   Post subject: (No subject)

I don't think there is a way to do that with a regular txt file.

seek works with binary files(I think), and you can tell it where to start the input.

best bet is to make several files, and declare an array for all the file variables

if you don't want to, then use get, and input up to a certain line, or a specific keyword, then disregard everything you inputted before, and start from that point.
PaddyLong




PostPosted: Thu Jul 17, 2003 9:01 pm   Post subject: (No subject)

yeah seek works with binary files ...

you could probably put some dividing string between the sections or something and manually parse the file... wouldn't be too difficult
Archi




PostPosted: Thu Jul 17, 2003 9:25 pm   Post subject: (No subject)

If you don't mind my asking, but how would I go about doing such a thing?
PaddyLong




PostPosted: Sat Jul 19, 2003 4:27 am   Post subject: (No subject)

well first read up on input from a file...

then just go through the file and get lines and if the line matches your magical seperating line then you found a split or whatever
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: