开发者

How does the compiler interpret this expression?

开发者 https://www.devze.com 2023-03-14 21:44 出处:网络
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:

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

精彩评论

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