Can someone please tell me how to fix this? I'm trying to make a calculator that can divide, add, and subtract, but I get an error on line 16 I believe, saying "expected primary expression before ')' token". Here is the code:
I have another problem now. I can't figure out how to make the program stay open and let you keep putting in new calculations. Can someone tell me how?
Integer D was meant for a feature of the program I hadn't yet added, it was supposed to be part of the code that let's you do one step algebra in the calculator, but I haven't decided exactly how I was going to code that out.
And can you please tell me what was wrong with system("cls")? is it because some people say system() stuff is evil? Haha.
Do you know about string parsing?
you could use that for it.
EDIT:
I had made a calculator sometime back as well, I had used a class for it
(though it could be made without it).
You can see the code here: http://pastebin.com/F8hZUmEb
It takes the input in form of a single string like : 25*51
and will break it into three parts, 25, 51 and *
and then it functions the same as yours