31 lines
756 B
C

#include "input.h"
#include <string.h>
#include <ctype.h>
// TODO:
// eine Funktion implementieren, die ein einzelnes Wort aus einer Textdatei (words.txt) einliest und als C-String zurückgibt.
// Read words from file and store in 'words' array
// f gets ; komma und semikolon erkennen und alles in groß buchstaben (=uppercase)
int readWords(FILE *file, char words[][MAX_WORD_LEN], unsigned int maxWordCount)
{
file = fopen("words.txt", "r");
if (file == NULL)
{
printf("Fehler: Datei konnte nicht geöffnet werden!\n");
return 1;
}
else (file != NULL)
{
printf("Datei konnte geöffnet werden");
}
}
}
/*
char words[MAX_LINE_LEN][MAX_WORD_LEN];
unsigned int wordCount =0;*/