So i have a struct with the following elements:
typedef struct loja{
int numero;
char nome[MAX];
float area;
float faturacao[12];
} Loja[N];
i declared an array vetC[ ] for the struct and my next step was to eliminate a posicion of that array
int EliminarComum(int c,Loja vetC[]){
int posicao, i,a;
posicao = MostrarComum(c,vetC); ///only for the user to choose the position he wishes to eliminate.
if (posicao > c)
printf("can't delete.\n");
else {
for (i = posicao - 1; i < c - 1; i++){
vetC[i]->numero = vetC[i+1]->numero;
vetC[i]->nome = vetC[i+1]->nome;
vetC[i]->area = vetC[i+1]->area;
for(a=0;a<12;a++)
vetC[i]->faturacao[a] = vetC[i+1]->faturacao[a];
c--;
}
}
return c;
}
and in the line of vetC[i]->nome = vetC[i+1]->nome;
gives me the error
error: assignment to expression with array type