Generating data structures by parsing plain text files
I wrote a file parser for a game I'm writing to make it easy for myself to change various aspects of the game (things like the character/stage/collision data). For example, I might have a character class like this: class Character { public: int x, y; // Character's location Character* teammate; } I set up my parser to read in from a file the data structure with syntax similar to C++ Character Sidekick { X = 12 Y = 0 } Character AwesomeDude { X = 10 Y = 50 Teammate = Sidekick } This will create two data structures and put them in a map <std::string, Character*> , where the key string is