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 PostThis would have been very easy for you to test yourself, just made a quick test program:
int i = 5; cout << i++; // Still 5
int i = 5; cout << ++i; // Now 6
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.