Witam,
Mam pewiem problem otóż mam funkcję:
struct student ** najlepsi(int ** ile)
{
struct student ** najlepsi;
struct student s[50];
int i=0;
int x=0;
int b=1;
FILE *plik;
plik=fopen("dane.bin","r");
while(fread(&s[i],sizeof(struct student),1,plik)!=0)
{
i++;
}
fclose(plik);
for(x=0;i<x;x++)
{
if(s[x].srednia>4.75)
{
najlepsi=(struct student*)realloc(najlepsi,b*sizeof(struct student));
najlepsi[b-1]=s[x];
b++;
}
printf("%s",*(najlepsi)->nazwisko);
}
*ile=b;
return najlepsi;
};
Jak powinno wyglądać wywołanie takiej funkcji w mainie ?