I want to convert the hex value in the character array to integer
<p>I want to convert the hex value in the <code>character array</code> to an <code>integer</code>.</p>

<pre><code>int main()
{ 
    char arr[5];
    arr[0] = 0x05;
    int a = atoi(&amp;arr[0]);
    cout &lt;&lt; "Number = " &lt;&lt; a; //output = 0 but i want here value 5  
}
</code></pre>
