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

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -