From a232db8ffe344615ec5fe7fb4cf2242d9848f806 Mon Sep 17 00:00:00 2001 From: Yannis DOUMIR FERNANDES Date: Tue, 24 Oct 2023 08:59:27 +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 | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/app/core_logic/responsable.c b/src/app/core_logic/responsable.c index 701a61c..d6eeefd 100644 --- a/src/app/core_logic/responsable.c +++ b/src/app/core_logic/responsable.c @@ -25,4 +25,23 @@ int chargementArticles(int tRef[], float tPoids[], float tVol[], float tPrix[], i++; } return i; +} + +void sauvegadArticles(int tRef[], float tPoids[], float tVol[], float tPrix[], float tLogique) +{ + int i; + FILE * fe; + fe = fopen("articles.txt","w"); + if ( fe == NULL ) + { + perror("fopen"); + return -1; + } + + for ( i = 0; i < tLogique; ++i) + { + fwritef(fe,"%d\t %.2f\t %.2f\t %.2f\n", ); + } + + fclose(fe); } \ No newline at end of file