Converting array of type char into a int variable
<p>Compiling this on <a href="http://codepad.org/vlhwNjBN" rel="nofollow">Codepad</a>:</p>

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

void main (void)
{
    char ch[2];
    int value;
    cout&lt;&lt;"Enter two integers between 0-9"&lt;&lt;endl;
    cin.getline(ch,2);

    //testing with char array
    //(...)
    //how could I do operations like '*', '+', '-', or '/' to the char arrays
}
</code></pre>

<p>Gives:</p>

<blockquote>
  <p>Line 4: error: '::main' must return 'int'
  compilation terminated due to -Wfatal-errors.</p>
</blockquote>

<p>For example:</p>

<p>Lets say <code>ch[0]='5'</code> and <code>ch[1]='3'</code></p>

<p>what do I need to do so I can do ch[0] - ch[1] = 2 and store into an int value</p>
