Why doesn't c = a+++++b work in C?

C

C Problem Overview


> Possible Duplicate:
> Please help me understanding the error a+++++b in C

In a discussion today the topic of pre/post increment came up.

We tried several combinations of addition and increment:

c = a+++b //works
c = a++ + ++b //works
c = a+++ ++b //works
c = a+++++b // doesn't work, compiler error "error: invalid lvalue in increment

Where is the difference? What exactly does that additional whitespace add for the parser so the program compiles?

C Solutions


Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionFemarefView Question on Stackoverflow