From 0cd447599e388c9b266c0aa2fd3cf0564736782b Mon Sep 17 00:00:00 2001 From: Sophia Weber Date: Sun, 28 Jan 2024 13:12:45 +0100 Subject: [PATCH] refactoring: Rename global variable and define --- src/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.c b/src/main.c index 310d6ea..a496f5e 100644 --- a/src/main.c +++ b/src/main.c @@ -3,12 +3,12 @@ #include #include #include -#define STRINGL 200 +#define STRING_LENGTH 200 -char a[STRINGL] = {0}; +char inputBuffer[STRING_LENGTH] = {0}; void main() { printf("Geben Sie eine Rechenoperation ein (Bsp.: 1+1):\n"); - fgets(a, STRINGL, stdin); //fgets statt scanf, holt den kompletten String inkl. Whitespace - processInput(a, strlen(a)); + fgets(inputBuffer, STRING_LENGTH, stdin); //fgets statt scanf, holt den kompletten String inkl. Whitespace + processInput(inputBuffer, strlen(inputBuffer)); }