First C++ calculator
there is a lot of thing you can do to further add depth:

move the printing out of the switch
display an help with current operators
implements others operator (pow(), sin(), square(), root()...), you'll then have to check the number of arguments
use a std::map&lt;string, *functionPointer&gt; to avoid the switch
implement a parsing function so you can just enter something like &quot;3+2*8&quot;, this would require care as you have to check operator precedence, using prefix or postfix representation could help and allow ignoring &quot;)(&quot;.