From cef158c1bee6ace046056326d3c0b202b1a756c3 Mon Sep 17 00:00:00 2001 From: Yannis DOUMIR FERNANDES Date: Tue, 24 Oct 2023 09:23:09 +0200 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'src/app/core=5Flog?= =?UTF-8?q?ic/responsable.c'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/core_logic/responsable.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/app/core_logic/responsable.c b/src/app/core_logic/responsable.c index d6eeefd..27bccca 100644 --- a/src/app/core_logic/responsable.c +++ b/src/app/core_logic/responsable.c @@ -44,4 +44,22 @@ void sauvegadArticles(int tRef[], float tPoids[], float tVol[], float tPrix[], f } fclose(fe); +} + +int ajouterArticle( int tRef[], float tPoids[], float tVol[], float tPrix[], int *tLogique, int tPhysique, int ref, float poids, float volume, float prix) +{ + int i = *tLogique; + affichAjoutArticle(&ref, &poids, &volume, &prix); + if ( *tLogique == tPhysique) + { + fprintf(stderr,"Tableau plein !"); + return -2; + } + + // SI on trie pas par ref c'est ca + tRef[i] = ref; + tPoids[i] = poids; + tVol[i] = volume; + tPrix[i] = prix; + } \ No newline at end of file