title: Parsing Command Line Arguments in C++?
body: <p>What is the best way of parsing command-line arguments in C++ if the program is specified to be run like this:</p>
  <pre><code>prog [-abc] [input [output]]
  </code></pre>
  <p>Is there some way of doing this built into the standard library, or do I need to write my own code?</p>
  <hr />
  <p>Related:</p>
  <ul>
  <li><a href="https://stackoverflow.com/questions/332849/parsing-command-line-arguments-in-a-unicode-c-application">Parsing command line arguments in a unicode C++ application</a></li>
  </ul>