Program crashes when trying to convert const char* to long long
<p>When the program runs, it crashes at long long thisLong = atoll(c); Is there any reason for this? </p>

<pre><code>string ConvertToBaseTen(long long base4) {
    stringstream s;
    s &lt;&lt; base4;
    string tempBase4;
    s &gt;&gt; tempBase4;
    s.clear();
    string tempBase10;
    long long total = 0;
    for (signed int x = 0; x &lt; tempBase4.length(); x++) {
         const char* c = (const char*)tempBase4[x];
         long long thisLong = atoll(c);
         total += (pow(thisLong, x));
    }
    s &lt;&lt; total;
    s &gt;&gt; tempBase10;
    return tempBase10;
}
</code></pre>
