made work: count the number of words in a file_t*
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user