With the asterisk in you were incrementing the data you want to send, not the pointer. So this was an endless loop.
Actually, no. In C, "++" binds more tightly than "*". So "*x++" is really "*(x++)" which is why you can do e.g ."*x++ = 0;". The before and after statements are equivalent.
You are right, i missed the binding precedence.
But then the asterisk does not do anything and is needless.
I was replying to this particular quote. As in the combination of "*x++ = 0;" and "But then the asterisk does not do anything and is needless.". I was not replying to what you may or may not have been thinking while you were writing that. ;-)
But from your question I see what you meant to say.
Maybe you can explain what the asterisk would do exactly (and why they would be neccessary) in the following two statements:
1. *x++;
2. *(x++);
As for the answer, that would depend on how naive the compiler is, and what optimizations and such. In general I would expect those to just increment the x pointer. In fully pedantic mode, and on a platform where a memory access also performs a particular operation (memory mapped control register or whatnot) that cannot be optimized away, you could also expect it to do: 1) access memory at location x and then 2) increment x pointer.