Incompatible types when assigning to type ‘char[11]’ from type ‘char *'.
Code:
void table_sorting (char l_plates[M][N], double payments[M]) {
int i, j;
char *tmp1;
double tmp2;
for (i = 0; i < M; i++) {
for (j = i; j < M; j++) {
if (strcmp(l_plates[i], l_plates[j]) > 0) {
tmp1 = l_plates[i];
l_plates[i] = l_plates[j];
l_plates[j] = tmp1;
tmp2 = payments[i];
payments[i] = payments[j];
payments[j] = tmp2;
}
}
}
}
So at lines 12 & 13 I'm getting
error: incompatible types when assigning to type ‘char[11]’ from type ‘char *'
How come?