In C, how to configure the initial settings for a certain program using key-value pairs with any or all of them: plain text configuration file , environment variables and command line parameters. In addition, how to decide which method values exceed those of the other two. Then, if the values have been changed, it is not necessary to update the configuration file.
What is the easiest way to do this, and what, if any, are the most acceptable methods? Is there a small open source program that gives a good example of how this can be done?
source
share