title: Checking arguments in terminal
body: <p>How can I write a program to check the arguments in the terminal are correct?</p>
  
  <p>For example, if I have a program <code>hello.cpp</code> and I want to call it as:</p>
  
  <pre><code>./hello yes 10
  </code></pre>
  
  <p>I want the program to make sure that the first argument is yes or no and the second argument is a number between 1-10.  So how can I read these arguments into my program to do the checking?</p>
  
  <p>Thanks!</p>