title: getopt argument depends on another
body: <p>is there a builtin way to make an argument depend on another when using getopt? For example, I have my switch case setup and everything works fine, but I need my -m argument (the length of the markov chain) before I read a text file (-i).</p>
  
  <p>In other words, I would like to make sure that other arguments aren't set when processing my input arg.</p>
  
  <p>Small excerpt:</p>
  
  <pre><code>    while ((opt = getopt_long(argc, argv, "i:shm:", long_options, &amp;option_index))
         != -1)
  {
      switch (opt) {
          case 'i':
              inputEnglish.ReadFile((string)optarg);
              break;
  
          case 'm':
              inputEnglish.setMarkovLength(atoi(optarg));
              break;
  
          case 's':
              break;
  
          case 'h':
              printHelp();
              break;
  
          case '?':
              cout &lt;&lt; "dfgdfgdf" &lt;&lt; endl;
              return 0;
              break;
  
          default:
              printHelp();
              return 0;
              break;
      }
  }
  </code></pre>
  
  <p>If there aren't any built-in ways, do you have a clean way of doing this? Clean code being more important than efficiency here. Thank you for any help!</p>