b++
is the same as:
int temp = b;
b = b + 1;
return temp;
As you can see b++
will return his old value, but overwrites the value of b
. But since you assign the returned (old) value to b
, the new value will be overwritten and therefore "ignored".
A difference would be, if you write:
b = ++b; //exactly the same as just "++b"
This does the incrementation first and the new value will be returned.