+ 3
variable++ vs ++variable
PREFIX OR SUFFIX? That is a question.
3 Answers
+ 11
prefix changes value prior usage, suffix after
Example:
int x = 5;
cout << ++x; // x becomes 6, prints 6,
cout << x++; // prints 6, x becomes 7
cout << x; // prints 7
+ 3
PREFIX increments the variable before getting her state.
SUFFIX getting state of the variable before increment her.
I am sorry i am not very speek english.
+ 2
Fu.k, today i had an short examine of this and 70% of class get 1 (me 3), becouse our teacher thinks we can everything :P
Ps. Siemano piotrek