From 37fc481970f1f82b56e9e4595cf2dda987d5e56a Mon Sep 17 00:00:00 2001 From: Sophia Weber Date: Sat, 27 Jan 2024 15:07:05 +0100 Subject: [PATCH] Enum and struct for calculation in inputHandling.h --- src/inputHandling.c | 2 ++ src/inputHandling.h | 13 +++++++++++++ 2 files changed, 15 insertions(+) diff --git a/src/inputHandling.c b/src/inputHandling.c index 6e8615d..8388c59 100644 --- a/src/inputHandling.c +++ b/src/inputHandling.c @@ -22,3 +22,5 @@ void deleteWhitespace(){ } } } + + diff --git a/src/inputHandling.h b/src/inputHandling.h index b73a64c..9e9a011 100644 --- a/src/inputHandling.h +++ b/src/inputHandling.h @@ -1,6 +1,19 @@ #ifndef INPUTHANDLING_H #define INPUTHANDLING_H +typedef enum{ + opAdd, opSub, opDiv, opMult, opExp, opLog +}op; + +typedef struct { +op funktionstyp; +char* formel; +double array[10]; +void* child; +double result; +}calc_op; + extern void input(); + #endif // INPUTHANDLING_H