*value++;
It undoes the reference to the value at the location that value points to, and increments the value pointer due to the post-increment. In fact, this is the same as value++ , since you discard the value returned by the expression.
But how come when I do the following, no compile error happens?
Because it is a valid statement, and you simply discard the value returned by the expression. Similarly, you can have statements like:
"Random string"; 42;
and they are valid and will compile a fine (but worthless).
We discard the many return values of standard library functions. For example. memset() returns void * to the memory that was installed, but we rarely use it. It is not so intuitive, but it is absolutely true.
PP
source share