The best way is to convert your expression from an infix expression to a postfix expression and then use a stack to evaluate the expression. If you don't know what the bold words mean, Google them up.
Further, the way you want to proceed depends on whether you want it to use variables or not.
Eg. If you enter 'x^2+x+2' and expect the computer to ask 'what is x?', the approach is different.
The amount of code that goes in varies on the quality of the calculator. If you want to make a calculator that only has infix operators (i.e. no functions like sin), then it can be done without OOP and using only 2 to 4 functions.
But if you want to make a high quality calculator with not only expression evaluation with variables but features like numerical differentiation and integration and compatibility with all types like int, double, bool, std::complex, matrices, vectors, etc, then you'll have to write a lot of code.
I tried to make the good one a few months back. It's complete (except there's no domain checking in functions) and I had to write 74 kb of code.