Convert a number from string to integer without using inbuilt function
<p>I am trying this technique but error is coming. Please help me to convert a number from string to integer.</p>

<pre><code>#include&lt;iostream&gt;
using namespace std;

int main()
{
    char *buffer[80];
    int a;

    cout&lt;&lt;"enter the number";
    cin.get(buffer,79);

    char *ptr[80] = &amp;buffer;
    while(*ptr!='\0')
    {
        a=(a*10)+(*ptr-48);
    }
    cout&lt;&lt;"the value"&lt;&lt;a;

    delete ptr[];

    return 0;
}
</code></pre>

<p>Errors are:</p>

<ol>
<li>error C2440: 'initializing' : cannot convert from 'char <em>(</em>)[80]' to 'char *[80]'</li>
<li>error C2440: '=' : cannot convert from 'char *' to 'int'</li>
</ol>
