Fix de quelques bugs

doc
Rémi LAVERGNE 2 years ago
parent 2fba475d23
commit 2e737c5731

@ -57,7 +57,7 @@ void modifyClient(void)
scanf("%c%*c", &choice);
}
// Faire une recherche du numéro client
fscanf("%d%f%d", &numClient, &cagnotte_add, &suspended);
fscanf(client, "%d%f%d", &numClient, &cagnotte_add, &suspended);
while(!feof(client))
{
if (numClient == searchedNumClient)
@ -80,6 +80,8 @@ void modifyClient(void)
cagnotte += cagnotte_add;
// Ecrire la modif
}
fscanf(client, "%d%f%d", &numClient, &cagnotte_add, &suspended);
}
fclose(client);
return;

@ -12,8 +12,8 @@
//! TRAITEMENT DES FICHIERS
void chargeDonnees(int reference[], float weight[], float volume[], float unitPrice[], int clientID[], float cagnotte[], int suspended[]);
void chargeArticles(int reference[], float weight[], float volume[], float unitPrice[]);
void chargeClients(int clientID[], float cagnotte[], int suspended[]);
int chargeArticles(int reference[], float weight[], float volume[], float unitPrice[]);
int chargeClients(int clientID[], float cagnotte[], int suspended[]);
void sauvegardeDonnees(int reference[], float weight[], float volume[], float unitPrice[], int clientID[], float cagnotte[], int suspended[]);
void sauvegardeArticles(int reference[], float weight[], float volume[], float unitPrice[]);

@ -11,7 +11,7 @@ void chargeDonnees(int reference[], float weight[], float volume[], float unitPr
chargeClients(clientID, cagnotte, suspended);
}
void chargeArticles(int reference[], float weight[], float volume[], float unitPrice[])
int chargeArticles(int reference[], float weight[], float volume[], float unitPrice[])
{
FILE *article;
article = fopen("articles.txt","r");
@ -47,7 +47,7 @@ void chargeArticles(int reference[], float weight[], float volume[], float unitP
return tL;
}
void chargeClients(int clientID[], float cagnotte[], int suspended[])
int chargeClients(int clientID[], float cagnotte[], int suspended[])
{
FILE *client;
client = fopen("clients.txt","r");

Loading…
Cancel
Save