Priority:
The C language has a total of 15 priorities:
Parentheses: (), []; member operators:-> ,.
Second for all single object; // All single object operators, such as ++ -- + (positive)-(negative) pointer operations *&
Multiply the remainder three and add or subtract four; // This "remainder" refers to the remainder operation, that is, %
Shift 5, relation 6; // shift operator: <>>, relation: ><>=
Equals (and) to the seventh row; // that is, =! =
Bitwise AND exclusive or bitwise OR, // these operations are bitwise operations: bitwise AND (&) exclusive or (^) bitwise OR (|)
"Three parts of the World" 80 or 90;
Logical or sum, 12th and 11th; // OPERATOR: | and &&
The condition is higher than the value assignment;
The lowest comma operation level; // The lowest comma operator priority
Since the operator priority of C language is not exactly the same as that of C ++ (mainly adding several operators), this phrase cannot be fully used in C ++. but it should be compatible. You can compare their differences and quickly grasp the priority of C ++!
Combination:
If the operator has the same priority, you have to look at the combination, which is summarized as follows:
From right to left (3 in total): single object operator, conditional operator, and value assignment operator.
The other operators (that is, the Union direction) are from left to right.