Hello good pple of the forum
Now i have created a text file using c with the following code:
[PHP]main()
{
int id;
char firstname[20];
char lastname[20];
FILE *pt;
if((fp=fopen("client.txt","w"))==NULL)
{
puts("sorry can't open file");
}
else{
do{
scanf("%d %s %s", &id, firstname, lastname);
fprintf("%d %s %s\n", id, firstname, lastname);
}
while(!feof(stdin));
}
return 0;
}
[/PHP]
Now with the above code i can insert customer records with id, firstname, lastname into the file. Now, my question is how do search this file for a particular customer record using the id number as a search criteria?
please help me
Thank you in advance