Hi,
I have a peace of code that I wrote in C long time ago. Therefore it uses functions and unfortunately also global variables. Its purpose was to read parameters from input file and store them in those global variables, so that later I could use them in functions that computed something. It was my text version of User Interface.
Now I would like to rewrite this in C++ and use objects. I am asking for ideas how should I organize that. Shell I make one giant class (say class IO) and put the parser functions for the input file and command line together with variables (the ones that used to be global in my C code)? Or is there a better way?
What do you do with variables (parameters) that you use in your code? Do you store them in singleton object and pass that object to other classes? How shall I deal with that in a Object Oriented environment?