i have a problem with updating a file
first the program read the file then save it in memory after that sort the records and ask user to input which record the user wants to update
after find it and update the record
how can i put it back in the same position in the file?
after open and read the file first time then close it
i open file again to put the updated record back in the same positon i use this
f=fopen("a:\\Country.txt","r+");
then write it back
fwrite(&cty,sizeof(cty),1,f);
it seems like it doesn't save it back in the same position it was
do i have to use fseek? how to use it?
Thanks