#include<conio.h>
#include<stdio.h>
FILE*f;
typedef struct
{char nev[40];char fogl[30];int fiz;}ADAT;
ADAT a;
char fiznev[20];
main()
{puts("\n Feltoltes\n");
puts("Mi lesz a file neve?"); gets(fiznev);
f=fopen(fiznev,"wb");
do
{printf("\nNev:");scanf("%s",&a.nev);
printf("\nFoglalkozas:");scanf("%s",&a.fogl);
printf("\nFizetes:");scanf("%d",&a.fiz);
fwrnite(&a,sizeof(a),1,f);
puts("Akarod folytatni?(i/n)");}
while(getch()=='i');
fclose(f);
getch();
}
