I guess my C++ training is still way too embedded, because I'm having trouble with the concept of always needing an ojbect upon which to invoke a method.
Basically, I'm writing a section of a program that will read a config file and set its options. The C++ programmer in me wants to, once the file is loaded, loop through line by line, each time calling a setConfig(
String value, int place) function, which would be just below the end of the function my loop is in.
Sadly, I've found, I can't just say this.setConfig(blah, blah). It wouldn't make a lot of sense to instantiate an object of the class these functions are found in...or at least so I think. Putting my setConfig function in its own class and instantiating an object of that type is the only thing that seems logical...but to me, it also seems to make for difficult-to-manage code, while sapping system resources through constant object instantiation.
What would be the best way to go about doing this -- best meaning easiest to manage and taking up the least system resources -- that you can think of?
Alex Kirk