As EssGeEich said, the context of your example doesn't really do anything different. These operators are convenient for looping when you want to either used a variable's current value or its new value.
Here is an example that might help:
1 2 3 4 5 6 7 8 9 10 11 12 13
|
int
LegalAge = 21,
age = 0;
while( age++ < 21 )
{
cout << "Your age is " << age << "." << endl;
cout << "You can't have a beer until you are " <<
LegalAge; << "!" << endl << endl;
}
|
In the example above, you will have the following output:
Your age is 1.
You can't have a beer until you are 21!
Your age is 2.
You can't have a beer until you are 21!
Your age is 3.
You can't have a beer until you are 21!
Your age is 4.
You can't have a beer until you are 21!
Your age is 5.
You can't have a beer until you are 21!
Your age is 6.
You can't have a beer until you are 21!
Your age is 7.
You can't have a beer until you are 21!
Your age is 8.
You can't have a beer until you are 21!
Your age is 8.
You can't have a beer until you are 21!
Your age is 10.
You can't have a beer until you are 21!
Your age is 11.
You can't have a beer until you are 21!
Your age is 12.
You can't have a beer until you are 21!
Your age is 13.
You can't have a beer until you are 21!
Your age is 14.
You can't have a beer until you are 21!
Your age is 15.
You can't have a beer until you are 21!
Your age is 16.
You can't have a beer until you are 21!
Your age is 17.
You can't have a beer until you are 21!
Your age is 18.
You can't have a beer until you are 21!
Your age is 19.
You can't have a beer until you are 21!
Your age is 20.
You can't have a beer until you are 21!
If you changed the example to:
you would have the following output:
Your age is 1.
You can't have a beer until you are 21!
Your age is 2.
You can't have a beer until you are 21!
Your age is 3.
You can't have a beer until you are 21!
Your age is 4.
You can't have a beer until you are 21!
Your age is 5.
You can't have a beer until you are 21!
Your age is 6.
You can't have a beer until you are 21!
Your age is 7.
You can't have a beer until you are 21!
Your age is 8.
You can't have a beer until you are 21!
Your age is 8.
You can't have a beer until you are 21!
Your age is 10.
You can't have a beer until you are 21!
Your age is 11.
You can't have a beer until you are 21!
Your age is 12.
You can't have a beer until you are 21!
Your age is 13.
You can't have a beer until you are 21!
Your age is 14.
You can't have a beer until you are 21!
Your age is 15.
You can't have a beer until you are 21!
Your age is 16.
You can't have a beer until you are 21!
Your age is 17.
You can't have a beer until you are 21!
Your age is 18.
You can't have a beer until you are 21!
Your age is 19.
You can't have a beer until you are 21!
Your age is 20.
You can't have a beer until you are 21!
Notice that the first line starts with "Your age is 1" in this case.
I hope this helped to explain the difference.
EDIT: Thanks to cire who caught my cut and paste error!