question on c++

I am trying to make a calculator type of program and I am stuck on the calculating part. I want the user to be able to put in as many entries as they'd like and at the end I have them type in "done".

The question is, how do I add all the entries they have entered whether it was 2 entries or 16 entries and how could I display them on the screen?
Ivor Horton has several chapters in his Beginning Visual C++ Book (at least the older edition I have) on that exact topic. So if you are looking for a short blurb of code showing how to do it don't hold your breath. Sorry if I'm sounding overly cryptic, but that's essentially an involved task usually involving extensive recursive string parsing algorithms. Let me give an example. Suppose the user entered this...

(7 + 24) * 87 * (65 + 18 -7) / 15


???

Last edited on
you have to get it in as a string and then calculate it.
Topic archived. No new replies allowed.