#include "input.h" #include #include // 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 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; }