Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void recherche_adherent(adherent_t *adhr, int *n)
- {
- char personne[50];
- char choix='o';
- int trouve,i,str;
- while (choix=='o')
- {
- system("clear");
- trouve=-1;i=0;str=0;
- printf("Qui est l'adhérent recherché ?\n");
- lire_chaine(personne, 50);
- while (i<(*n))
- {
- str=(strcmp(adhr[i].adh_nom,personne));
- if (str==0)
- {
- trouve=i;
- printf("Nom : %s | N°Adherent : %d | Ville : %s | Code Postal : %d | Nom de Rue : %s\n", adhr[trouve].adh_nom, (adhr[trouve]).adh_num, adhr[trouve].adh_adresse.adr_ville, (adhr[trouve]).adh_adresse.adr_cp, adhr[trouve].adh_adresse.adr_rue);
- }
- i++;
- }
- if (trouve ==-1) printf("Il n'y a pas d'utilisateur à ce nom.\n");
- printf("Souhaitez vous lancer une nouvelle recherche (o) ou retourner au menu adhérent (n).\n");
- choix = lire_caractere();
- }
- menu_adherents();
- };
Add Comment
Please, Sign In to add comment