If you are so smart why can't you figure this out yourself?? Smart boys and girls will at least attempt to solve the program and post what they have done. They also read the forum Rules and know that we don't do people's homework for them.
Are you oky with the core C++? (your smart so I'm sure on this).
Then the next thing that you need to know is http://en.wikipedia.org/wiki/Finite-state_machine
so what actually a calculator does is it parses the input using a simple state
machine and return the result or an ERROR! .
And that is a very simple calculator, but you are a smartboy so you need to
write a big full functional calculator. So you probably need to know how the
compilers are working. So you need to read books about compiler theory.If you
can't afford the books for money then you could find free tutorials and video
lectures.A good tutorial is here. http://ds9a.nl/lex-yacc/cvs/lex-yacc-howto.html