Like let's say -
A a1,a2,a3,a4;
a1=a2*a3+a1++/2;
Assuming there is a class A and *,+,post increment operator(++) and / are overloaded in class A. a1,a2,a3,a4 are objects of A class.
So what's the order of evaluation of operators in above expression -
If we'll check according to the precedence of operators then * will be evaluated first then / then + and last post increment(++). But I have overloaded multiple operators but they are not working according to the precedence.
Please tell.
What I have tried:
Tried googling and also did experiment but still didn't understand.