i’m looking for a library that can do the following :
- ask questions and generate an input file
- read that input file
- while reading the modified input file, the lib assigns the value into the program accordingly to the description in the input file.
i wrote a simple program that does it, like this:
>./main
gaussian width:2
here the program cout “gaussian width” and i input “2”. the program also generates parameters.txt file:
gaussian width:2
i can start the program with an existing file:
>./main parameters.txt
it reads the parameter “2” from parameter file and assigns it to int gaussianWidth within the program.
I couldn’t find anything like that on the web, so i’m almost done writing one. but i’mm wondering if there is an elegant library like that, for example in boost.
What you are looking for is program options from boost. However you may need to adapt your input file.