RE: C question |
||
![]() ![]() Delta Cpt dopel ++ptr does an increment before the operation it is used in, ptr++ does it after. So for example you have this... i = 0 errval = somefunct(i++) errval = somefunct(++i) The first call will pass 1 to the function whereas the second will pass 0. On 2008-08-10 05:48:13, sefo wrote >ok, then this might help you: > >http://www.daniweb.com/forums/thread9362.html >http://www.codeguru.com/forum/showthread.php?t=231052 > >On 2008-08-09 19:31:25, Chudik wrote >>No, at least i know that its something that has to do with assigning before evaluation and vise versa.. >> >>On 2008-08-09 06:07:24, sefo wrote >>>I think that basically: >>> >>>++i or ++ptr is the C++ way to increment (as in: i = i+1 or i += 1) >>>whereas i++ or prt++ is the standard C way. >>> >> Replies:
|
||
| CyberArmy::Forum v0.6 Generated In 0.00598 seconds |