I want to write a C++ program that uses a class to do some calculations.
I pass arguments to the program, some of which are used to set up class members. A class function will then perform the necessary calculations.
I am wondering how I should pass the arguments from the program to set the class members and then call the function performing the algorithm.
One way to do this is by parsing all the to the class (using a list consisting of a key and a value) and creating a class function
set_param( Parsing& List )
It checks all the keys and if the key matches some predefined strings, it will set the class member value.
I would like some opinions and alternative ways to do all this, outlining both advantages and disadvantages when using them, and which one might be good candidate for implementation.