+++我 [英] +++i
问题描述
先生,
我不知道如何使用这个synatx是有效的,如果有的话怎么用它
谢谢,
kapilk
kapilk写道:先生,
我不知道如何使用这个synatx是有效的,如果有的话怎么用它
谢谢,
kapilk>
你想要完成什么?
我理解++ i将增加变量i。
但我不明白第三个''''是否是拼写错误。
表达式+ i ;这本身没有任何意义。
-
托马斯马修斯
C ++新闻组欢迎辞:
http://www.slack.net/~shiva/welcome .txt
C ++常见问题: http ://www.parashift.com/c++-faq-lite
C常见问题: http://www.eskimo.com/~scs/c-faq/top.html
alt。 comp.lang.learn.c-c ++ faq:
http:// www.comeaucomputing.com/learn/faq/
其他网站:
http://www.josuttis.com - C ++ STL图书馆书籍
Thomas Matthews< Th ** **************************@sbcglobal.net>写在
新闻:uy ************** @newssvr16.news.prodigy.com:
我不知道如何使用这个synatx是有效的,如果有的话如何使用它
谢谢,
kapilk
你想要完成什么?
我理解++ i将增加变量i。
但我不明白第三个+是否是拼写错误。
表达式+ i本身没有任何意义。
贪婪的词汇分析应该狼吞虎咽。根据运营商的优惠价格向上运营商。所以+++ i,我相信,是+(++ i),我认为这是''i'增加的积极的
结果。我已经在二进制表达式中看到了这个,但没有
一元,例如
k = j +++ i;
当然,这里的空间非常强大,表示意图如下:
k = j + ++ i;
-
- 马克 - >
-
文章< Xn ******* *************************@130.133.1.4> Mark A. Odell < OD ******* @ hotmail.com>写道:
....贪婪的词汇分析应该狼吞虎咽。根据运营商的优先顺序提升运营商。
错误。优先权与它无关。它被解析为:
++ + i
因此而且格式不正确。 (有些编译器允许它,gcc就是其中之一。)
-
dik t。冬天,cwi,kruislaan 413,1098 sj amsterdam,nederland,+ 31205924131
home:bovenover 215,1025 jn amsterdam,nederland; http://www.cwi.nl/~dik/
Sir,
I dont know how to use this synatx is it valid and if at all how to use it
Thanks,
kapilk
kapilk wrote:Sir,
I dont know how to use this synatx is it valid and if at all how to use it
Thanks,
kapilk
What are you trying to accomplish?
I understand that "++i" will increment the variable "i".
But I don''t understand if the third ''+'' is a typo.
The expression "+i" does not make any sense by itself.
--
Thomas Matthews
C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.comeaucomputing.com/learn/faq/
Other sites:
http://www.josuttis.com -- C++ STL Library book
Thomas Matthews <Th****************************@sbcglobal.net> wrote in
news:uy**************@newssvr16.news.prodigy.com:
I dont know how to use this synatx is it valid and if at all how to
use it
Thanks,
kapilk
What are you trying to accomplish?
I understand that "++i" will increment the variable "i".
But I don''t understand if the third ''+'' is a typo.
The expression "+i" does not make any sense by itself.
Greedy lexical analysis should "gobble" up operators based upon their
precedence. So +++i, I believe, is +(++i) which I suppose is the positive
result of ''i'' incremented. I''ve seen this in binary expressions but not
unary, e.g.
k=j+++i;
Of course, spaces are quite powerful here in indicating intent as in:
k = j + ++i;
--
- Mark ->
--
In article <Xn********************************@130.133.1.4> "Mark A. Odell" <od*******@hotmail.com> writes:
....Greedy lexical analysis should "gobble" up operators based upon their
precedence.
Wrong. Precedence has nothing to do with it. It is parsed as:
++ +i
and as such malformed. (Some compilers allow it, gcc is one of them.)
--
dik t. winter, cwi, kruislaan 413, 1098 sj amsterdam, nederland, +31205924131
home: bovenover 215, 1025 jn amsterdam, nederland; http://www.cwi.nl/~dik/
这篇关于+++我的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!