Increment and Decrement operators

Posted by viswanathan on Stack Overflow See other posts from Stack Overflow or by viswanathan
Published on 2010-05-06T17:50:00Z Indexed on 2010/05/06 17:58 UTC
Read the original article Hit count: 118

Filed under:

How are the below valid and invalid as shown and what do they mean. When would such a situation arise to write this piece of code.

++x = 5;     // legal
--x = 5;     // legal
x++ = 5;     // illegal
x-- = 5;     // illegal

© Stack Overflow or respective owner

Related posts about c++