Piszę program będący bazą danych i natknałem sie na problem. Próbuje przypisac do zmiennej char po prostu ciąg znaków, ale mimo, ze program sie kompiluje, to jest jeden warning i ta wartosc nie jest przypisywana. Ciągle czytam i szukam, w czym jest błąd, ale nie moge sobie poradzic. Prosze o pomoc.
BŁAD
try.c:25: warning: assignment makes integer from pointer without a cast
KOD:
#include <stdio.h>
#include <stdlib.h>
struct rekord
{
char marka[15][500];
};
short int f1 (struct rekord *pole, int *n);
int main()
{
struct rekord pole;
int lw=0;
f1(&pole, &lw);
return 0;
}
short int f1 (struct rekord *pole, int *n)
{
*(*pole).marka[*n]="nono";
printf("\nrok: %s", (*pole).marka[*n]);
return 0;
}