From 3c68ced8ab63a04089a3ef9ec7d71d5bbf73ead2 Mon Sep 17 00:00:00 2001 From: Bastian Date: Thu, 23 Oct 2025 11:24:50 +0200 Subject: [PATCH] =?UTF-8?q?File=C3=B6ffner=20verbessert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Start_Windows/input.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Start_Windows/input.c b/Start_Windows/input.c index 8f4ea1d..1b94f99 100644 --- a/Start_Windows/input.c +++ b/Start_Windows/input.c @@ -9,11 +9,11 @@ int readWords(FILE *file, char words[][MAX_WORD_LEN], unsigned int maxWordCount) { //Erstellt Pointer auf textdokument - FILE *textdokument = fopen("words.txt", "r"); - if (file == NULL) { - printf("words,txt konnte nicht geoffnet werden"); + FILE *textdokument = fopen(file, "r"); + if (textdokument == NULL) { + printf("Datei konnte nicht geoffnet werden"); } - // ToDo 2D char Array um wörter zu speichern kommt hier rein + // 2D char Array um wörter zu speichern char word[MAX_WORD_LEN]; unsigned int count = 0; while (fscanf(textdokument, "%s", word) != EOF && count < maxWordCount) {