przypisanie wartości do tablicy

0

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;
}
0
#include <stdio.h>
#include <stdlib.h>

struct rekord
{
        char* marka[15];  //ZAMIANA
};

short int f1 (struct rekord *pole, int n); //ZAMIANA

int main()
{
        struct rekord pole;
        int lw=0;
        
        f1(&pole, lw); //ZAMIANA
        system("PAUSE");
        return 0;
}


short int f1 (struct rekord *pole, int n) //ZAMIANA
{
        
        pole->marka[n]="nonosdfsdfsdfsdfsdfs"; //ZAMIANA
        printf("rok: %s\n", pole->marka[n]); //ZAMIANA
        return 0;
}

1 użytkowników online, w tym zalogowanych: 0, gości: 1