i am writing to delete a specific record in a file and how can i do that???
User will enter their reference number, if it is same as that in file, detail will be printed.After that, how can i delete that record??????
pls help!!
in=fopen("customer.dat","a");
if (in==NULL)
printf("File could not opened !\n");
printf("\t\tPlease enter Reservation Number for deletion\n"
printf("\t\tYour reservation number : ");
scanf("%d",&input);
while(!feof(in))
{
fscanf(in,"%d%d%d",&ref,&classno,&count);
if (input==ref)
{
printf("\t\t%5d%15d%8d\n",ref,classno,count);
printf("\n\t\t\t\tDelete (Y/N) : ");
scanf("%d",&ans4);