file handling

#include<stdio.h>
#include<conio.h>
#include<string.h>
#include<iostream>
int main()
{
char findname[15],pnum[15],fname[15],lname[15];
FILE *fp;
fp=fopen("file1.txt","r");
printf("Find criminal I.D number:");
scanf("%s",&findname);
while(!feof(fp))
{
fscanf(fp,"%s %s %s\n",&pnum,&fname,&lname);
if(strcmpi(findname,fname)==0||strcmpi(findname,lname)==0||strcmpi(findname,pnum)==0)
{
printf("\n\n%s %s %s\n",pnum,fname,lname);
printf("\nFound %s %s %s\n",pnum,fname,lname);
}
if(strcmpi(findname,fname)!=0||strcmpi(findname,lname)!=0||strcmpi(findname,pnum)!=0)
printf("There are no Criminal Records Found\n",findname);
}
fclose(fp);
getch();
}





how to fix these one? someone help me? asap :) thanks in advance
1) Please use code tags when posting code, to make it readable:

http://www.cplusplus.com/articles/z13hAqkS/

2) Fix what? You haven't told us anything about the problem you're facing.
im making a system, Police Criminal Records, supposed to be i have criminal records, then must know if there are matches found or none, just look at my program, sorry for the english by the way.. dont know what to declare statements in the no matches found.. what to do? thanks
@MikeyBoy
Topic archived. No new replies allowed.