can anyone tell me what is the process of i+++ increment in c++.
It is a syntax error.
Using the maximum munching rule i+++
is tokenized as:
i ++ +
The last +
is a binary addition operator. But clearly it does not have two operands which results in parser error.
EDIT:
Question from the comment: Can we have i++++j
?
It is tokenized as:
i ++ ++ j
which again is a syntax error as ++
is a unary operator.
On similar lines i+++++j
is tokenized by the scanner as:
i++ ++ + j
which is same as ((i++)++) + j
which again in error as i++
is not a lvalue and using ++
on it is not allowed.