
C - struktury
Ahoj chcel som aby mi program nacital zo suboru par udajov, ale vypisuje mi to chybu neviete vcom je prosim vas problem?:
1. Warning: format '%f' expects argument of type 'float *',but argument 5 has type 'double'
2. Warning: format '%d' expects argument of type 'int *',but argument 6 has type 'int'
druh je premenna typu char, kontinent tiez, hmotnost je float a mladata int.
Tu je riafok kde je chyba:
while(fscanf(fr,"%14s %9s %f %d\n",(zvierata+pocetZvierat)->druh,(zvierata+poce tZvierat)->kontinent,(zvierata+pocetZvierat)->hmot nost,(zvierata+pocetZvierat)->mladata)!=EOF)