From a1f73a0e334c1e76a98841f998521a0b4474a9b3 Mon Sep 17 00:00:00 2001 From: Markus Kob Date: Thu, 30 Oct 2025 17:15:56 +0100 Subject: [PATCH] added functionality to input.c --- Start_Linux/input.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Start_Linux/input.c b/Start_Linux/input.c index ed77805..9e6e157 100644 --- a/Start_Linux/input.c +++ b/Start_Linux/input.c @@ -8,5 +8,17 @@ // Read words from file and store in 'words' array int readWords(FILE *file, char words[][MAX_WORD_LEN], unsigned int maxWordCount) { + char word[MAX_WORD_LEN]; + // we possibly don't need fopen, since file is already a parameter + // fopen(stream) + + fgets(word, MAX_WORD_LEN,file); + // fgets(string, length, file *stream) + + strcpy(words[maxWordCount-1], word); + maxWordCount++; + // we possibly also won't need to close the + // fclose( *) + return 0; } \ No newline at end of file