This commit is contained in:
maxgrf 2025-11-06 16:35:30 +01:00
parent cddbfb3029
commit 28a2aa1ea1
4 changed files with 6 additions and 7 deletions

Binary file not shown.

View File

@ -20,17 +20,16 @@ int readWords(FILE *file, char words[][MAX_WORD_LEN], unsigned int maxWordCount)
while(word_parts != NULL && counter < maxWordCount)
{
// Kopiere das Wort sicher in das words-Array
// Kopiere das Wort in words-Array
strncpy(words[counter], word_parts, MAX_WORD_LEN - 1);
words[counter][MAX_WORD_LEN - 1] = '\0';
// Alles in Großbuchstaben umwandeln
for(int i = 0; words[counter][i] != '\0'; i++)
for(i = 0; words[counter][i] != '\0'; i++)
{
words[counter][i] = toupper(words[counter][i]);
printf("%c",words[counter][i])
}
/*
for(i = 0; i < MAX_WORD_LEN -1; i++) //MAX = 100
@ -45,7 +44,7 @@ int readWords(FILE *file, char words[][MAX_WORD_LEN], unsigned int maxWordCount)
*/
counter++; // Wort eingelesen, Wortzähler erhöhen
word_parts = strtok(NULL, ",;\n\t/. "); //NULL für Zeiger angeben
}
}
}
return counter;

Binary file not shown.

Binary file not shown.