Converting hex string to unsigned int issue C++
<p>I am currently designing a code and one of the instructions given is to get the first two digits of a hex string and do a desired operation. Everything that is less than A is taken into account. Anything greater than that is not, it just takes the next number. Which messes up the code.</p>

<p>Here is the line which converts it:</p>

<pre><code>int x = atoi(hex.c_str);
</code></pre>

<p>What am I doing wrong?</p>
