title: Getting a hexadecimal number into a program via the command line
body: <p>I can do this:</p>
  
  <pre><code>int main(int argc, char** argv) {
    unsigned char cTest = 0xff;
    return 0;
  }
  </code></pre>
  
  <p>But what's the right way to get a hexadecimal number into the program via the command line? </p>
  
  <p><code>unsigned char cTest = argv[1];</code> </p>
  
  <p>doesn't do the trick. That produces a <em>initialization makes integer from pointer without a cast</em> warning.</p>