Write your question here.
I am having difficulty in giving precedence to the mathematical operators i.e. I want to implement the "DMAS" rule of mathematics. Can anyone help me in this regard?
I doubt you can change that. You might be able to do something with expression templates though.
However, if you are not actually talking about code, but about a "calculator" that reads in text, converts it into expression, and then evaluates the expression -- then your question is about parsing a string into a tree.