hey guys.
i cant remember for the life of me what the difference is between putting ++ before or after a variable (specifically an int). for example in a for loop.
dan_e6
0
Light Poster
Recommended Answers
Jump to PostUsing the incrementor before a variable will first increment the value of the variable and then use this value.
Using the incrementor after a variable will use the current value of the variable, and then increment the variable after.
This is generally just a shortcut or "code-condenser". If …
All 3 Replies
n1337
29
Junior Poster in Training
Radical Edward
301
Posting Pro
William Hemsworth
1,339
Posting Virtuoso
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.