#include "helloWorld.h" #include "inputHandling.h" #include "outputHandling.h" #include #include #include #define STRING_LENGTH 200 char inputBuffer[STRING_LENGTH] = {0}; void main() { calc_op *result = NULL; printf("Geben Sie eine Rechenoperation ein (Bsp.: 1+1):\n"); fgets(inputBuffer, STRING_LENGTH, stdin); //fgets statt scanf, holt den kompletten String inkl. Whitespace processInput(inputBuffer, strlen(inputBuffer)); do { result = getNextCalc(); if (result == NULL) { break; } if (result->functionsType==opResult) { result->result = result->inputNumbers[0]; showResult(result); break; } /* Calculation*/ result->result = 65478; } while (1); result = getNextCalc(); }