hello everybody,I'm a new member ,and i was hoping that you could help me with my problem . I'm making a secondary school system using linkedlist and files and i add students into two levels each one with a different linkedlist.
we are suppose to add ,update,delete,search,display and then save each list in a different file.
I want to make search function according to student's level and id
but it's just not working I Know I'm supposed to make the pointer move but i don't know how please HELP!!!!!
Here is my attempt
void search(struct school *move)
{
int level,id ;
/* check if list is empty */
move=head;
if (move == NULL)
{ printf("\n\n\tThe list is empty ");
}
else
{
printf("\n\nEnter the level to search for : ");
scanf(" %d",&level);
printf("\n\nEnter the id to search for :");
scanf("%d",&id);
if(move->level==level&&move->id==id)
{
printf("\n\n Student Record Is FOUND ") ;
wait();
}
else
{
printf ("\n\n Student Record Is NOT FOUND ");
wait();
}
}//end else
}//end function