totally confused

回答: 回複:回複:我用visual c++ 6.0: 對的.clowhand2004-06-29 20:45:35

I just tested
int a=10
printf("a=%d a++=%d ++a=%d",a, a++,++a);

The gcc's output is:
a=12 a++=10 ++a=12
How to explain this? No matter which direction, the arguments are pushed into the stack, this result is not reasonable.

所有跟帖: 

3! anwsers. Avoid! -紅辣椒- 給 紅辣椒 發送悄悄話 (13 bytes) () 06/30/2004 postreply 17:23:18

能解釋嗎? -真糊塗啦啦...- 給 真糊塗啦啦... 發送悄悄話 (0 bytes) () 06/30/2004 postreply 19:38:44

回複:能解釋嗎? -紅辣椒- 給 紅辣椒 發送悄悄話 (317 bytes) () 06/30/2004 postreply 19:47:15

這樣看來,還是VC++合理些 -意味深長- 給 意味深長 發送悄悄話 (0 bytes) () 06/30/2004 postreply 19:46:01

Finally! got the answer, -fianlly- 給 fianlly 發送悄悄話 (81 bytes) () 07/01/2004 postreply 08:43:49

請您先登陸,再發跟帖!