With this code i am searching a person who is saved in a struct in a TXT by his document number and then i print that person if actualy exist in the file. it works.
What i want to do now is if i find more then one person with the same document number in the same file print it also.
can some one help me i am not really that good in this.
Ty.
Code:Pnodo searchDocumentInPeople(Pnodo lista,int document) { Pnodo aux; for(aux = lista;aux!=NULL; aux = aux->sig) { if(aux->info.document==document) { return aux;//return the direction of the node where it was found } } return NULL;//is not threre