I have problem with my code , I get run time error.
This code is suppose to ask the user to enter a name and then go through the file and search for the input entered by the user.
and I got this warning.
( [Warning] passing argument 1 of 'strcmp' makes pointer from integer without a cast [enabled by default]
void search()
{
 FILE *infile;
int i=0,found=0;
char list[SIZE], str[SIZE];
infile = fopen("records.txt","r");
printf("enter a book name to search in the list > /n");
gets(list);
i=0; 
while (!found && i<SIZE) {
        if(strcmp(list[i], str) == 0)
            found = 1;
        else
          i++;
}
if(found)
        printf("%s is in the list at row %d\n",str,i);
    else printf("%s is not in the list.\n", str);
  printf("\n");    
}
 
     
    