made work: count the number of words in a file_t*

This commit is contained in:
Odweta
2023-12-26 09:50:18 +01:00
parent cb04f9a87c
commit f1444de526
5 changed files with 110 additions and 17 deletions
+9
View File
@@ -77,5 +77,14 @@ int main() {
fileCleanup(g);
//fileCleanup(g_copy);
printf("counting words in a file\n");
file_t* words = fileInit("test.txt");
int word_count = fileCountWords(words);
printf("word count of file %s is %d\n", words->path, word_count);
fileCleanup(words);
return 0;
}