c++ - How does the priority of :: and (expr) matter? -


my c++ textbook says there's 18 priority classes operators in c++. topmost class contains 1 operator, "scope resolution" operator (double colon, ::). "expression grouping" operator falls 2nd class, there's "function call" operator.

the priority :: , name(arg) (function call) seems clear me can think of a::b(c), should evaluated (a::b)(c). can't figure out when scope resolution operator , expression grouping operator can lead ambiguity if were in same priority class.

a * b + c * (b + c) // parentheses "expression grouping" operators 


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -