Dear all
It is claimed that priority of post increment is more than pre increment
May I ask show me an example?
Dear all
It is claimed that priority of post increment is more than pre increment
May I ask show me an example?
The book of deitel
If by "priority" you mean "precedence" (for grouping) and by "more" you mean "higher", then the opposite is true, so you either misread the book or it contains a typo error.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
At one time the precedence may have been different, but they now should be considered of equal precedence. See man operator.
That's interesting, and while I can't check my copy of C11 until tomorrow, I checked a draft copy, it seems that I'm mistaken: postfix operators are listed before the unary operators, and prefix operators are listed under the latter. I thought they were listed in the major subclause before postfix operators, but that's primary expressions only. It's unlikely that this would have changed in the past ten years, so I daresay that manual entry is incomplete.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)