Well, i still have no idea what you want to accomplish and what's your problem.
Something with A+B*C that just returns letter C
You know.
You have an input. What should this input look like? (A+B*C?)
And generally, what should the output look like?
Then you call CreateInfixTree(expr);
what should that function do?
How do you expect the function to store the data?
Then you call PostOrderPrintTree(root);
well, that just prints the data.
how should it print the data
1 2 3
|
string token;
stringstream ss(exp);
while (ss >> token) {...}
|
No good, stringstream just writes the whole string into "token", it does not split the expression
I don't want to know anything about your precedence system, just what you want to do with your program.
I just used this code, this code is from internet |
not helpful at all.....