struct node
{
char Id[100];
char Name[100];
int Gender;
int Age;
int status;
struct node *next,*prev;
}*curr,*head,*tail,*tcurr;
int search(char name[100])
{
curr=head;
while(curr)
{
if(strcmp(curr->Name,name)==0)
{
return 1; // found
}
curr=curr->next;
}
return 2;
}
Im write this search function to simplified my longway code below but im about to ask how to make this curr->...... become fill able in parameters? i mean like im not going to make 2 search function for searching name and id. im just going to change the parameters. Hope you guys can understand my english well. :) thankyou:)