Hello every1
I was making this program of a phone directory to store contacts and all their information in C. I made use of structure and then copied the data of the structure to a file.
the structure is
struct phdata
{
char name[20],add[20];
int phno;
}ph[20];
the problem i am facing is that when i run the program a second time, i need to know the no. of records already in the file so that new records are added after that. For this purpose i am having to use a separate file which contains the Number of records already in the file. Cant i achieve this only by using a single file rather than 2 separate files?