Calculation of the string as expression in C++
<p>In my project i need to take an expression input from user as string and then show the result of the expression. I am taking the input as follows</p>

<pre><code>char address[100] = {NULL};
fgets(address, 100, stdin); //take the expression as input here
</code></pre>

<p>say user wrote the expression as </p>

<pre><code>address = " 1+5+9" . 
</code></pre>

<p>What i need to do is to show the result of the expression. I can do this by separating each number and then doing the calculation. But i just wanted to know is there any better way to do this? </p>
