Well, Deranged has pointed me to TinyXML, so I might just scrap the current file parser I'm working on. It depends on if I can use TinyXML to fill instances of class "item" with the information parsed from an XML file. Could anyone reading this comment and let me know if it's possible and a good idea to use TinyXML to parse an XML file like below (this is just a guess at what an XML file would look like, I don't have any experience with XML) into a C++ object like [also] below?
EDIT: Hah, the past three entries have started with "Well". Ironic, since I'm not feeling at all "well" right now!
>
A potion of Mana
+
10 10 5 1 class item { string name; int price; string desc; mapint
> effects;
int InvenQuant, EquipQuant, StoreQuant;
}
The code for loading your structure would look like this:
And the input.txt data file would look like this:
For more information about Daabli, see this thread: http://www.gamedev.net/community/forums/topic.asp?topic_id=539326