CyberArmy University | Open Source Institute | CyberArmy Intelligence & Security | CyberArmy Services & Projects

RE: C question


[Replies] [Reply] [View by Thread] [Help]
[Back To Programming]

Posted by Delta Cpt dopel On 2008-08-11 01:27:26
In Reply to RE: C question Posted by Ker sefo On 2008-08-10 05:48:13

Delta CptDelta Cpt
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:


Guest:
Subject:
Message:
Signature:
Optional Image Link:
http://

CyberArmy::Forum v0.6
Generated In 0.00598 seconds


About Us | Privacy Policy | Mission Statement | Help