resolved errors with supprimer_article_du_panier

Signed-off-by: Mathéo Hersan <matheohersan@MacBook-Pro-de-Matheo.local>
pull/3/head
Mathéo Hersan 2 years ago
parent 2f451844e2
commit 609a071d09
No known key found for this signature in database
GPG Key ID: 4EF19C64D78EC91B

BIN
app

Binary file not shown.

@ -107,7 +107,7 @@ void ajouter_article_au_panier(int numeroClient, int references[], float poids[]
}
}
void supprimer_article_du_panier(int panier[], int *taillePanier) {
void supprimer_article_du_panier(int panier[], int quantites[], int *taillePanier) {
int reference;
printf("Entrez la référence de l'article à supprimer : ");
scanf("%d", &reference);
@ -127,6 +127,7 @@ void supprimer_article_du_panier(int panier[], int *taillePanier) {
for (int i = articleIndex; i < (*taillePanier - 1); i++) {
panier[i] = panier[i + 1];
quantites[i] = quantites[i + 1];
}
(*taillePanier)--;

@ -12,7 +12,7 @@ int charger_clients(int numeros[], float cagnottes[], int suspendues[], int tPhy
void ajouter_article_au_panier(int numeroClient, int references[], float poids[], float volume[], float prixUnitaire[],
int numeros[], float cagnottes[], int suspendues[], int nombreArticles, int nombreClients,
float volumeCoffre, float chargeMaximale, int panier[], int quantites[], int *taillePanier);
void supprimer_article_du_panier(int panier[], int *taillePanier);
void supprimer_article_du_panier(int panier[], int quantites[], int *taillePanier);
void affiche_recap_panier(int panier[], int taillePanier, int references[], float poids[], float volume[],
float prixUnitaire[], int quantites[]);
#endif //SAE_101_CLIENT_H

@ -93,7 +93,7 @@ void global_client() {
suspendus, nombreArticles, nombreClients, volumeCoffre, chargeMaximale, panier, quantites, &taillePanier);
break;
case 3:
supprimer_article_du_panier(panier, &taillePanier);
supprimer_article_du_panier(panier, quantites, &taillePanier);
break;
case 9:
printf("Au revoir !\n");
@ -104,3 +104,4 @@ void global_client() {
}
}while(choix != 9);
}

Loading…
Cancel
Save