From 6654f3340ab99d917b65e27e30ef22676ea46483 Mon Sep 17 00:00:00 2001 From: luis Date: Tue, 4 Nov 2025 10:48:06 +0100 Subject: [PATCH] input . c erster test --- Start_Windows/input.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Start_Windows/input.c b/Start_Windows/input.c index 77c996e..0c90d6c 100644 --- a/Start_Windows/input.c +++ b/Start_Windows/input.c @@ -6,7 +6,7 @@ // eine Funktion implementieren, die ein einzelnes Wort aus einer Textdatei (words.txt) einliest und als C-String zurückgibt. // Read words from file and store in 'words' array -// f gets ; komma und semikolon erkennen und alles in groß buchstaben (=uppercase) (strtok) + int readWords(FILE* file, char words[][MAX_WORD_LEN], unsigned int maxWordCount) { char delimiter[] = ", ; \n"; @@ -30,7 +30,7 @@ int readWords(FILE* file, char words[][MAX_WORD_LEN], unsigned int maxWordCount) while (token != NULL && count < maxWordCount) { for (char* p = token; *p; ++p) - *p=(char)toupper((unsigned char)*p); + (char)toupper((unsigned char)*p); strncpy(words[count], token, MAX_WORD_LEN - 1); words[count][MAX_WORD_LEN - 1] = '\0'; count++;