开发者

How does the compiler interpret this expression?

While readin开发者_如何学JAVAg through a C++ book, I came across an expression which was not explained properly (or maybe I just didn't understand the explanation). This is the expression:

c = a+++b;

Which of these does it mean?

c = a + (++b);  // 1

c = (a++) + b;  // 2

Thanks.


Its interpreted as:

c = a++ + b; //which is same as you're ve written : (a++) + b

Its following the Maximal munch rule.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜