|
2 years ago | |
---|---|---|
data | 2 years ago | |
include | 2 years ago | |
src | 2 years ago | |
.gitignore | 2 years ago | |
Makefile | 2 years ago | |
README.md | 2 years ago |
A simple C program, which parses a given file and counts the words it contains.
First you need to build the project with make:
$ make
words <file>
, where:
words
is the executable,<file>
is a path to a fileThere's also a binary words_bt
which uses a binary tree implementation instead of a linked list.
E.g.:
$ ./words data/aaa.txt
Words in this list (10):
* "a": 2
* "aa": 4
* "aaa": 4
There is also a C++ version (see main.cpp
) which you can build with:
make cpp
Usage is the same like for the C version.