It will give you the lvalue required error because When you have an assignment operator in a statement, the LHS of the operator must be something the language calls an lvalue.
For more info-https://stackoverflow.com/questions/33375136/lvalue-required-as-left-operand-of-assignment-error-when-using-c
It will give an lvalue required error because assignment operator requires its LHS should be in memory operand. Means LHS should be an assignable variable to which you can assign value. Here you are assigning the value to an expression that's why it is giving error.
64.3k questions
77.9k answers
244k comments
80.0k users