Ajustement des paramètres des fonctions.

master
Yann CHAMPEAU 3 years ago
parent 3f71ed51a5
commit e32db7646b

@ -57,13 +57,13 @@ int loadIUT(VilleIUT** tiut){
return tlogi;
}
int rechercheTabStr(char* tab[],int lTab,char* mot){/////////////////////////////////////// N O N /////////////////////////////
int rechercheTabPtVilleIUT(VilleIUT* tab[],int lTab,char* mot){
if(!lTab){
fprintf(stderr,"Erreur, Pas d'éléments dans le tableau !");
return -1;
}
for(int i=0; i<lTab;i++){
if(tab[i]==mot) return i;
if(tab[i]->Ville==mot) return i;
}
return -1;
}

@ -31,7 +31,7 @@ void menu(void); //
//
int loadIUT(VilleIUT** tiut); //Fichier Binaire. //
//
int rechercheTabStr(char** tab[],int lTab,char* mot); ///////////////////////////////////// N O N ////////////////////////////
int rechercheTabPtVilleIUT(VilleIUT* tab[],int lTab,char* mot); ///////////////////////////////////// N O N ////////////////////////////
//
//
//

@ -104,7 +104,7 @@ void SearchIUTFromDep(VilleIUT* lvIUT[],int tlogi)
//Partie Administrateur.
void menuAdmin(void){
void menuAdmin(VilleIUT* tiut[],int tlogi){
printf("#--------------------------------------------------------------------#\n");
printf("| |\n");
printf("| SAE S1.02 |\n");
@ -143,12 +143,12 @@ void menuAdmin(void){
}
}
void modifPlaces(VilleIUT* tiut,int tlogi){
void modifPlaces(VilleIUT* tiut{},int tlogi){
printf("Entrez la ville correspondant à l'IUT à modifier (Q pour abandonner):");
char* ville[31];
scanf("%*c%s",&ville);
if(ville=="Q") return;
int noVille=rechercheTabStr(tiut,tlogi,ville);////////////////////////////// N O N ///////////////////////////////////
int noVille=rechercheTabPtVilleIUT(tiut,tlogi,ville);
if(noVille<=0){
fprintf(stderr,"Ville non existante !");
return;

@ -16,7 +16,7 @@ typedef struct
//Consultant
void menuConsult();
void menuUser(VilleIUT* lvIUT[],int tlogi);
void SearchCityWithIUT(VilleIUT* lvIUT[], int tlogi);
@ -28,9 +28,9 @@ void SearchIUTFromDep(VilleIUT* lvIUT[],int tlogi);
//Admin
void menuAdmin(VilleIUT* tiut,int tlogi);///A CHANGER///
void menuAdmin(VilleIUT* tiut[],int tlogi);
void modifPlaces(VilleIUT* tiut,int tlogi);///A CHANGER///
void modifPlaces(VilleIUT* tiut[],int tlogi);///A CHANGER///
//void creerDep();

@ -17,7 +17,7 @@ int main(void)
switch(user){
case "C":
reset();
menuConsult();
menuConsult(tiut,tlogi);
reset();
break;
case "A":

Loading…
Cancel
Save