15,792,608 members
Home / Discussions / C / C++ / MFC

# C / C++ / MFC

 Re: Wrong evaluation of pre- and post-increment on variables: What is wrong here?!?! SandipG 22-Oct-09 2:57 SandipG 22-Oct-09 2:57
 Re: Wrong evaluation of pre- and post-increment on variables: What is wrong here?!?! __yash__22-Oct-09 3:02 __yash__ 22-Oct-09 3:02
 Re: Wrong evaluation of pre- and post-increment on variables: What is wrong here?!?! SandipG 22-Oct-09 3:09 SandipG 22-Oct-09 3:09
 Re: Wrong evaluation of pre- and post-increment on variables: What is wrong here?!?! Covean22-Oct-09 3:29 Covean 22-Oct-09 3:29
 Re: Wrong evaluation of pre- and post-increment on variables: What is wrong here?!?! __yash__22-Oct-09 3:40 __yash__ 22-Oct-09 3:40
 Re: Wrong evaluation of pre- and post-increment on variables: What is wrong here?!?! SandipG 22-Oct-09 3:44 SandipG 22-Oct-09 3:44
 Re: Wrong evaluation of pre- and post-increment on variables: What is wrong here?!?! Covean22-Oct-09 3:48 Covean 22-Oct-09 3:48
 How do you interpret the results (I have provided my comments) __yash__22-Oct-09 3:35 __yash__ 22-Oct-09 3:35
 I will surely read the article, i see a lot many interesting points there. But before that, just a little curious, 1. j++ = 5 //OK. Printed value is 5, after that it becomes 6 2. ++i = 6 //OK. First i is incremented to 6 then printed out 3. ++j = 6 //Incorrect.j will first be incremented then printed out. But note that present value of j is 6 (from step 1). So j at this stage becomes 7. 4. i++ = 6 //OK. i now is 7 after printing 5. j++ = 6 //Incorrect. Should have been 7 6. ++i = 7 //Incorrect. Should have been 8 Just to make things a little simpler ```i = j = 5; printf("%d %d %d\n",i++,i++,i++); printf("i %d\n",i);``` Now the output is: 5 5 5 i 8 Even if the beahviour is compiler-specific how do you interpret this example (or even the first one)?
 Re: How do you interpret the results (I have provided my comments) SandipG 22-Oct-09 3:45 SandipG 22-Oct-09 3:45
 Re: How do you interpret the results (I have provided my comments) Covean22-Oct-09 3:45 Covean 22-Oct-09 3:45
 Re: Wrong evaluation of pre- and post-increment on variables: What is wrong here?!?! David Crow22-Oct-09 3:55 David Crow 22-Oct-09 3:55
 Re: Wrong evaluation of pre- and post-increment on variables: What is wrong here?!?! __yash__22-Oct-09 21:52 __yash__ 22-Oct-09 21:52
 Text from the Html Table tag. NaveenHS22-Oct-09 2:09 NaveenHS 22-Oct-09 2:09
 Re: Text from the Html Table tag. David Crow22-Oct-09 4:08 David Crow 22-Oct-09 4:08
 how to use lpfnhook to keep view of dialog? 002comp22-Oct-09 0:11 002comp 22-Oct-09 0:11
 Re: how to use lpfnhook to keep view of dialog? CPallini22-Oct-09 0:40 CPallini 22-Oct-09 0:40
 Re: how to use lpfnhook to keep view of dialog? 002comp22-Oct-09 1:04 002comp 22-Oct-09 1:04
 Re: how to use lpfnhook to keep view of dialog? CPallini22-Oct-09 1:17 CPallini 22-Oct-09 1:17
 Re: how to use lpfnhook to keep view of dialog? 002comp22-Oct-09 1:30 002comp 22-Oct-09 1:30
 Re: how to use lpfnhook to keep view of dialog? CPallini22-Oct-09 1:41 CPallini 22-Oct-09 1:41
 Re: how to use lpfnhook to keep view of dialog? Michael Schubert22-Oct-09 1:54 Michael Schubert 22-Oct-09 1:54
 Re: how to use lpfnhook to keep view of dialog? Richard MacCutchan22-Oct-09 2:40 Richard MacCutchan 22-Oct-09 2:40
 Re: how to use lpfnhook to keep view of dialog? David Crow22-Oct-09 4:10 David Crow 22-Oct-09 4:10
 expression evaluation problem fcis200822-Oct-09 0:05 fcis2008 22-Oct-09 0:05
 Re: expression evaluation problem Rajesh R Subramanian22-Oct-09 0:15 Rajesh R Subramanian 22-Oct-09 0:15
 Last Visit: 31-Dec-99 19:00     Last Update: 1-Dec-23 19:49 Refresh ᐊ Prev1...2445244624472448244924502451245224532454 Next ᐅ