解析此表达式时适用哪些优先规则:
*(c++); // c is a pointer.
Run Code Online (Sandbox Code Playgroud)
谢谢.
好吧,我尝试了以下内容
x = *c; c++;
x = (*c++);
x = *(c++);
Run Code Online (Sandbox Code Playgroud)
它们似乎是等价的
有括号将表达式分组,因此++在之前进行评估*.
如果删除括号以获取*c++,则表达式仍将被解析为*(c++)而不是(*c)++因为优先规则.