From 6dd55ee91228c743d9428b5516aa15f35b4716ac Mon Sep 17 00:00:00 2001 From: Sophia Weber Date: Sat, 27 Jan 2024 16:34:00 +0100 Subject: [PATCH] Added Arraylength to struct --- src/inputHandling.c | 1 + src/inputHandling.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/inputHandling.c b/src/inputHandling.c index 4f081b3..4d4c736 100644 --- a/src/inputHandling.c +++ b/src/inputHandling.c @@ -71,4 +71,5 @@ void getnumbers(char* data, int length, calc_op* structure_ref){ //input sind: s i++; token = strtok(NULL, "+"); //Sucht von der letzten Plus-Stelle an weiter } + structure_ref->arraylength=i; //Länge des Arrays (also zu berechnende Zahlen) gespeichert } \ No newline at end of file diff --git a/src/inputHandling.h b/src/inputHandling.h index 2127896..a2d8614 100644 --- a/src/inputHandling.h +++ b/src/inputHandling.h @@ -9,6 +9,7 @@ typedef struct { op funktionstyp; char* formel; double array[10]; +int arraylength; void* child; double result; }calc_op;