Now, I also want to have a one line-input. How can that be done? Do you search for those commands and then check the character after that command and that's the value of your variable, and do that all through a for loop?
Or is there a better way to do such an one-line input?
If I don't misunderstand your question, then the second box above is the contents of an options file read in by myApp and you no longer want to only get those parameters from a separate file but also offer them as command line options.
Have a look at the getopt(3) man page of section 3. man 3 getopt
It looks for one letter options only. If you do prefer long options as your example, then have a look at getopt_long(3).
I am not sure, if you mean passing command line arguments (as has been shown), or reading input once your program has started. Since the latter hasn't been shown yet, I will try to provide an example: