lvalue required as left operand of assignment
You need to compare, not assign: Because you want to check if the result of strcmp(“hello”, “hello”) equals to 0. About the error: lvalue required as left operand of assignment lvalue means an assignable value (variable), and in assignment the left value to the = has to be lvalue (pretty clear). Both function results and constants are not assignable (rvalues), so they are rvalues. … Read more