Here, I provide a C++ implementation of a console – based calculator. Basically, it reads in infix arithmetic expressions and produces the result of their evaluation.
I made the simplifying assumption that tokens in the input expression are separated by spaces in order to simplify tokenization. The evaluation of expressions is done with two stacks, one for operands and the other for operators. The program combines the algorithms for infix-to-postfix conversion and postfix evaluation, eliminates the production of intermediate postfix expression and requires just one scan of the input infix expression.
Take a look at the C++ implementation.
Try your hand at problem ARTHEVAL that uses this idea.