hey what does the l-value mean in the expression
left operand must be l-value mean?
hey what does the l-value mean in the expression
left operand must be l-value mean?
l-value means left hand side of an = or comperason. Of course we could give you more help if we could see the code that wasy giving you the error.
The error is talking about a modifiable lvalue. A modifiable lvalue is an lvalue that isn't an array, const qualified type, incomplete type, or structure/union with any const qualified member. Most likely you're trying to assign an array to another array. Because arrays are not modifiable lvalues, you need to copy each element individually either with a loop, or with memcpy.
Code:#include <string.h> [...] memcpy(array1, array2, n * sizeof *array1);
thanks dudes