i used this code for my c++ calculator..
but i need a complex one..
it can only perform 1 operation..
if you input 1+1*8 or (1+1)*8 it only computes 1+1..
i need a program that can perform 4 operations..
for example:
(((1+1)*1)-1)-(1/1)
any help here please?
thanks
here's the code
#include <iostream>
#include <string>
#include <parser>
usingnamespace std;
int main()
{
string input;
getline(cin, input);
double ans = parseEquation(input);
cout << ans << endl;
return 0;
}
Obviously the above doesn't work. No one is going to give you full solutions, you need to actually try it yourself, and ask for help on specific questions if you get stuck.