title: unsigned char hex to int dec conversion C++
body: <p>How to convert variable unsigned char with HEX value to variable int with DEC value. I have got:</p>
  
  <pre><code>unsigned char length_hex = 0x30; // HEX
  </code></pre>
  
  <p>How to convert to int DEC?</p>
  
  <pre><code>int length_dec = length_hex; // With result length_dec = 48
  </code></pre>