int add char file struct info puipl FILE fopen file ab if printf Openi

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
int add(char *file)
{
struct info puipl;
FILE *f;
f=fopen(file,"ab");
if(!f)
{
printf("Opening Error\n");
return 1;
}
system("cls");
puipl=input_puipl();
fwrite(&puipl,sizeof(puipl),1,f);
fclose(f);
return 0;
}