You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
1.8 KiB

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "iut.h"
/*
void MenuAdministrateur(VilleIUT V){
char departement[30],respon[30];
int choix,nbp;
Maillon m;
printf("\n1-Modifier place\n2-Creer un departement\n3-supprimer un département\n4-Lancer et Arreter la phase de canditature\n5-modifier nom responsable");
scanf("%d",&choix);
if(choix==1){
//modification nbP
}
if(choix==2){
//creer departemement
printf("\ndepartement :");
scanf("%s",departement);
printf("\nnombre de place :");
scanf("%d",&nbp);
printf("\nresponsable :");
scanf("%s",respon);
V=Enfiler(V,departement,nbp,respon);
}
if(choix==3){
//supprimer departement et pauser condition pour choisir qui suppr
printf("\ndepartement :");
scanf("%s",departement);
printf("\nresponsable :");
scanf("%s",respon);
// *resultat=recherche(V.Ville,departement,respon);
m=suppression(m,departement,respon);
afficherE(m);
}
if(choix==4){
//Lancer et arreter phase de canditature
}
if(choix==5){
//modification responsable
}
afficher(V);
}
Maillon suppressionTete(Maillon m){
Maillon svt;
svt=m->suivant;
free(m);
return svt;
}
Maillon suppression(Maillon m,char *departement,char *responsable){
if(m==NULL)
return m;
if(strcmp(m->departement,departement) ==0 && strcmp(m->resp,responsable) ==0)
return suppressionTete(m);
m->suivant=suppression(m->suivant,departement,responsable);
return m;
}
void afficherE(Maillon m){
if(m==NULL)return;
printf("\n%s\t",m->departement);
printf("%d\t",m->nbP);
printf("%s\t",m->resp);
afficherE(m->suivant);
}
*/