I had been looking for an easy way to pull data from a file and use it in the game as something other than Ogre::String. After looking through the forums, I found no answer, but did find a few people who wanted to know the same thing. So Im posting this code here so that other people can use it.
So, I think this code is redundant. Your code also has a number of problems, such as loading the file every time for retrieving a single setting, not supporting file sections, not supporting multi-settings, and not supporting vectors, matrices, quaternions, being obsessed with c-strings (shudder - you can always convert an Ogre::String to a horrible old c-string using the c_str() method anyway). Maybe you just didn't know about StringConverter?
lol, as a matter of fact, I did not know about the StringConverter, or how to use it Thanks for being honest about it though Sinbad. This was just a quick code and I didn't want to improve on it if nobody liked it. But now that I know there is an actual code for it, then I will have to look it up and use that instead.
Thank you for your honest input. I would rather know that something was bad and find a better solution than think that something was good, and it really sucks.
Or in short:
Im glad that a developer pointed this out, instead of a player.