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) {