Searching structure piece
I have an structure array containg information about students of a class. The Information was read from a file into the structures. I then display this information and ask the user to pick a student by entering their ID number, i then send the ID and the structure of students to a function and search the structure for that student and specifically display their information only. I have this .. a function that supposed to search and compare students ID with the user entered ID, and print out that students information.
Code:
void find_applicant(struct school *student, char ID[10], int NumEmp)
{
int i;
for(i=0; i<NumEmp; i++)
{
if(strcmp(ID, student[i].appnum) = 0)
{
printf("%s\n", student[i].appnum);
printf("%s\n", student[i].fname);
printf("%s\n", student[i].lname);
printf("%10.0lf\n", studen[i].pnum);
printf("%s\n", student[i].email);
printf("%d\n", student[i].numskl);
printf("%d\n", student[i].year);
printf("%s\n", student[i].make);
printf("%s\n\n\n", student[i].mod);
}
}
}
it keeps telling me "invalid lvalue assignment" for the line with strcmp. I don't understand the problem. Thanks for any help or advice given.