Input.c wurde geändert, um die Eingabe von Wörtern zu ermöglichen. Die Funktionalität wurde erweitert, um sicherzustellen, dass die Eingaben korrekt verarbeitet werden.

This commit is contained in:
JonasPittel committed 2026-10-29 09:57:06 +01:00
1 parent 93db739464
commit 5b4ef70452
2 files changed
+15 -1

No files matched your search

+10
View File
@@ -8,5 +8,15 @@
// Read words from file and store in 'words' array
int readWords(FILE *file, char words[][MAX_WORD_LEN], unsigned int maxWordCount)
{
if (file == 0) {
return -1;
}
int count = 0;
while(count < maxWordCount && scanf(file, %99s, words[count]) == 1){
count++;
}
}