title: convert hex buffer to unsigned int
body: <p>I've been trying to convert a hexadecimal number saved in a buffer to an unsigned int. However the "0x00" in front of every hexadecimal number that I'm reading from has been giving me problem, in essence the problem (in a downscaled version) looks like this:</p>
  
  <pre><code>char b[] = "0x0014A12";
  std::stringstream ss;
  unsigned int i;
  ss &lt;&lt; std::hex &lt;&lt; b;
  ss &gt;&gt; i;
  cout &lt;&lt; i &lt;&lt; endl;
  </code></pre>
  
  <p>Any tips?</p>
  
  <p>Note: The program outputs a high decimal nubmer which equals CCCCCC in hex.</p>