Prbl Fichier
This commit is contained in:
		
							
								
								
									
										13
									
								
								VANDAMME28.c
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								VANDAMME28.c
									
									
									
									
									
								
							@@ -590,7 +590,7 @@ long int rechercheClient(char nom[__STRLEN__], char prenom[__STRLEN__], FILE * c
 | 
			
		||||
{
 | 
			
		||||
  client = malloc(sizeof(Client));
 | 
			
		||||
  long int ofsetFileCurClient;
 | 
			
		||||
  fseek(clientDatF, 0, SEEK_SET);
 | 
			
		||||
  fseek(clientDatF, sizeof(unsigned long int)+sizeof(Bool), SEEK_SET);
 | 
			
		||||
  clearerr(clientDatF); //Clear EOF
 | 
			
		||||
  do
 | 
			
		||||
  {
 | 
			
		||||
@@ -749,7 +749,7 @@ void clientBinToTXT(FILE * bin, FILE* txt) //===================================
 | 
			
		||||
void modificationClient(Client * client, FILE * clientDatF, FILE * clientTXTF)
 | 
			
		||||
{
 | 
			
		||||
  int choix = 0;
 | 
			
		||||
  char ** aModifier = {&client->adresse, &client->contact.telephne, &client->contact.email};
 | 
			
		||||
  char ** aModifier = {&client->adresse, &client->contact.telephone, &client->contact.email};
 | 
			
		||||
  char ** aAfficher = {"Adresse", "Telephne", "E-mail"};
 | 
			
		||||
  do
 | 
			
		||||
  {
 | 
			
		||||
@@ -758,7 +758,7 @@ void modificationClient(Client * client, FILE * clientDatF, FILE * clientTXTF)
 | 
			
		||||
      printf("Erreur choix errone !\n");
 | 
			
		||||
    printf("MODIFICATION CLIENT %s %s \n", client->nom, client->prenom);
 | 
			
		||||
    printf("1. Adresse\n2. Telephne\n3. E-mail\n");
 | 
			
		||||
    printf("Votre choix :");scanf("%d", &choix);
 | 
			
		||||
    printf("Votre choix :");clean_keyboard();scanf("%d", &choix);
 | 
			
		||||
  }while(!(choix == 1 || choix == 2 || choix == 3));
 | 
			
		||||
  printf("Modification %s :", aAfficher[choix-1]);
 | 
			
		||||
  if(choix == 1)
 | 
			
		||||
@@ -775,6 +775,11 @@ void modificationClient(Client * client, FILE * clientDatF, FILE * clientTXTF)
 | 
			
		||||
    }
 | 
			
		||||
    cleanFgets(client->adresse.rue);cleanFgets(client->adresse.numero);cleanFgets(client->adresse.localite);
 | 
			
		||||
    cleanFgets(client->nom);cleanFgets(client->prenom);
 | 
			
		||||
 | 
			
		||||
  }
 | 
			
		||||
  else
 | 
			
		||||
  {
 | 
			
		||||
    printf("Modification de %s :", aAfficher[choix-1]);
 | 
			
		||||
    clean_keyboard();
 | 
			
		||||
    scanf("%s", aModifier[choix-1]);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user