I declare this at the beginning of my program:
typedef struct personnelData
typedef PersonnelData* PersonPtr;
I want to write a function to search a student record by typing a student ID.
int search_number(int student_number)
while(index<20 && found==0)
i found that I fail to get the value of ptrList[index]->StudentID
Therefore, the program is failed to do the comparision.
Can someone help me?
I tried to print out the value of ptrList[index]->StudentID before the while loop, but something strange has happened.
when I wrote:
> the printed value is incorrect
but when I wrote
>the printed value is correct
Thank you very much!