OK. So, here is a link to a table of operator precedence. At the bottom, it talks about the increment and decrement operators, saying that they have a high (the highest) precedence, but the actual action doesn't take place until later... so what good does the higher precedence do?

Also, I can't seem to figure it out, what does *a++ = *b++ do?

Thanks,
Cody

Stated that way, it its a bit of a confusing thing. But, your second question can help put it into perspective.

I'm assuming a and b are pointers to arrays of some type. The * would dereference the pointers, giving you the values pointed to. So the value b points to is assigned to the value a points to. Then a and b (the pointers) are incremented, so that they then point to the next values in the arrays. Precedence comes into play in that the post-increment operators associate to a and to b, the pointers, not to *a and *b, the stored values.

Does that help?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.