There seems to be a great lack of online information on file i/o, and the one good resource I found still didn't answer the question I was looking for.
I am looking into this as part of a self-created project. I earlier wrote a text-based game which passes through areas by returning function pointers to hard-coded 'maps'. I was hoping to migrate all of the maps into text or binary files as practice, but what I had imagined as the solution isn't possible based on the resources I've found. I'm wondering if this is possible at all.
What I was hoping was to have the maps formatted like this:
but I haven't found any information on how to navigate around input files, that is, how to use "//Area1" as a delimiter, or how to take the information from the "//Movement" section and use that to search through the file for the next area.Code://Area1 Level description etc etc //Options Opt1 desc opt2 desc //Movement Opt 1: move to area1b Opt 2: move to area2
Anybody have any links or resources on this topic, or know that it simply can't be done?